2

Sf azure:Refresh token exchange to renew access token process (not working)

I am facing an issue where I have a named credential configured in Salesforce using auth provider (using openid connect for Azure AD) is returing unauthorized 401 after 1-2 hours as soon as the acccess token expires.

For the first time - I am able to successfuly authenticate named credential against azure AD platform using 3 legged approach (by granting consent/ permission to app) to app registered in azure and this works perfectly & I am able to make api callouts but after a while when the access token expires, Salesforce is unable to exchange refresh token for access token.

note this is under my scope api://9e86d2e4-171d-45..1/.default openid offline_access user.read i.e. 3 scopes separated by spaces

Or for below see the Scope as https://graph.microsoft.com/.default offline_access openid (offline_access to ensure sf can azure to exchange refresh token for new access token) but this is NOT working as expected.

Now Question: Does Salesfore presently supports openid connect for Azure AD to renew access token in exchange with refresh token automatically for us ? and if it does then i am sure its just a permission miss in scope or somewhere which iam not able to rectify.

enter image description here

enter image description here

3
  • This might be a Salesforce-side issue or it might be on Azure side or somewhere in between. A generic approach to troubleshooting issues like this is to create a minimal, reproducible example with a command-line client talking to Azure. Without this example as part of your question, it's tough to say which party might be at fault.
    – identigral
    Mar 4, 2021 at 21:19
  • i tried and tested the approach with postman, advanced rest client using and the inital oauth flow works, but the real problem starts when the access tokn expires, Salesforce as pr documntation says it handles the process of exhanging refresh token for new access token but looks like it is unable either a. Sf does not suppor it yet for azure Ad or b. i am missing some scop paameters which woudl help fill the gap Mar 5, 2021 at 7:38
  • Did you find a solution to this @mohitchhabra ? Aug 26 at 9:09

0

Your Answer

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