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?

3
  • 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? Dec 16, 2016 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 13, 2017 at 15:18
  • You don't need the actual password. Who is your identity provider for SSO? Jan 13, 2017 at 16:03

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .