0

We are evaluating accessing SalesForce services from our custom portal. We even investigate implementing SAML based SSO to simplify login to both systems. However, to create new records in SalesForce as the user currently logged in in our custom portal, REST-API calls has to contain proper session ID.

How can I efficiently get this user's session ID?

We don't have an access to user passwords stored in our portal so it is not possible to get SalesForce session ID via SOAP login (as I usually do).

Does SSO bring any advantages here when it comes to REST-API calls between both systems?

  • Without any knowledge of what platforms your portal is running, it's hard to say what the best method is, however, the basic flow is the same, if you want them to not have to sign into both systems. I have done this in the SOAP API - Is there a reason you're using the REST vs the SOAP? – HungryBeagle Dec 16 '16 at 14:39
  • @HungryBeagle Currently I am getting sessionId of SalesForce via Soap call passing my credentials - login.salesforce.com/services/Soap/c/35.0 - I am not sure how to create sessionId for actual user logged into my portal (I don't have access to user's password). – Jan Tosovsky Jan 13 '17 at 15:18
  • You don't need the actual password. Who is your identity provider for SSO? – HungryBeagle Jan 13 '17 at 16:03
1

SSO Really improves the Customer Experience. Consider the following....

Use Salesforce as your Identity Provider (IdP). You portal, the Service Provider (SP), gets setup in Salesforce as a Connected App. A User then logs into Salesforce (and gets a Salesforce Session Id), then launches your portal through the Connected App (and gets a Session Id from your portal). At this point, the User can navigate seamlessly in and out of both environment. Additionally, the users session ID/access token can be used for Salesforce API Access from your portal.

Naturally there is some overhead to get your portal (or portals!) setup with using SAML for login and API calls. I can state from experience that the setup on the Salesforce side is declarative, and not terribly onerous. Effective collaberation between the dev teams on the IdP and SP side is important when getting this setup.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.