Reputation: 1106
My app is developed in Laravel 5.5. I am using laravel-saml2 package for setting up Service provider on my app. I am trying to configure SSO with Salesforce. I setup the IDP in salesforce from SP metadata.
I am getting redirected to salesforce for login. After submitting form, I am getting back to my app https://xxx/saml2/acs with following error message
array:2 [▼
"code" => "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed"
"msg" => ""
]
Any help would be appreciated.
Upvotes: 0
Views: 2843
Reputation: 1106
I fixed this problem. This was due to Salesforce.
You can check on the logs under 'Manage Users -> Identity Provider Event Log'. This could give reason for your error. I got a 'Error: User does not have access to this service provider' error. For this, the user was not given permission. Even if the user is System Administrator, the access to Connected App is not given by default.
To give permission, go to 'Manager Users -> Users' and click edit on the user you are testing.Click profile name link .e.g System Administrator. This takes to profile page. You can scroll below to 'Connected App Access' and you would see that the access is not given. Give the access by clicking edit profile in the top of page.
Upvotes: 9