This is my final post for my experiment around setting up SSO in a Salesforce org while using another Salesforce org as my Identity Provider. All the other posts related to this experiment are below -
Now I am in the final step of my experiment and am going to login back to my Salesforce org which is acting as my Idp. Here I am going to add a connected app for the SSO enabled Salesforce org by doing the following -
- Navigate to the Setup -> Create -> Apps and create a new app under the Connected Apps section
- In the new connected app, set the field values as -
- Name - unique name of the connected app
- Set the Enable SAML to true in the Web App Settings section
- Now you will have to fill the data in SAML details that will show up.
- The entity id should match the entity id from the SSO app (sso enabled salesforce org my domain url)
- ACS url - the login url of the SSO enabled app.
- Subject type - The user record field value that will be sent to the SSO enabled environment. In my case I am using the username as the subject type
- I am leaving rest of the fields like Name Id format, Issuer as it it.
- Next assign this connected app to the profiles of the users who need to get authenticated to the SSO enabled salesforce org.
- Ensure that the federated id on the SSO enabled salesforce org matches the Subject type you set in this environment. It is very important to do this.
Note: In my research I am not enforcing encryption and certificate based authentication at all ends. I would suggest that it is highly recommended to do this especially in a production Org.
Thats it, my integration now works perfectly. Next time, i try to access the SSO enabled salesforce Org's my domain url, i see a Salesforce login page with the message "To access this page, you have to log in to Salesforce"
This is because it is redirecting me to the Idp login page. I enter the credentials for logging into my idp here. When i enter it correctly, it logs me into my SSO enabled salesforce org!
This concludes my little SSO experiment. Looking forward to post about other things soon. Enjoy!
Comments
Post a Comment