0

I have created one RestResourc to give the ability to the external system to attach the Report to Asset in Salesforce. Now the problem I am facing is the user which I am using for Authentication pourpose has the 'Is Single Sign-On Enabled' permission enabled so it won't allow me to generate the access token using the API.

Do you have any workaround for this? How can I use the user with the permission enabled 'Is Single Sign-On Enabled' for API Integration?

Thanks Nirav Shah

  • 1
    Did you try to create a custom permission set with API Enabled set to true and assign this set to your user? – Mariia Illarionova Oct 15 '19 at 6:59
  • Yes, I have created Permission Set with the Permission 'Is Single Sign-On Enabled' as true and assigned it to the user. API Enabled is already given on Profile level – Nirav Shah Oct 15 '19 at 7:04
  • Did you check this flow ? help.salesforce.com/… , to obtain the OAuth access token for the API you must : generate a certificate and a private key -> upload the certificate to your connected app -> Digitally sign the SSO SAML assertion returned by your identity provider using the private key after your user is logged-in -> make a POST to the token endpoint of OAuth-> Salesforce returns the access token. This flow is called Saml Bearer Assertion Flow. – toufik_at Oct 15 '19 at 10:06
  • Hi, @toufik_at I have uploaded the Certificate to the connected app. Now how can I Digitally sign the SSO SAML assertion? Do I need to Enable SAML in the Connected App and add Entity Id ACS URL from my Service Provider (in my case it is Okta)? What step do I need to perform – Nirav Shah Oct 16 '19 at 5:01
  • 1
    Hi @NiravShah, i may have suggested the wrong OAuth flow, i think this one is less complicated for your case : help.salesforce.com/…, check the "Exchange a SAML Assertion for an Access Token" part – toufik_at Oct 16 '19 at 8:42

Your Answer

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

Browse other questions tagged or ask your own question.