+ Start a Discussion

Named Credential issue: The authentication provider didn't provide a refresh token

I configured Connected App, OAuth, named Credential to establish a REST API call to Salesforce Tooling API.

I'm seeing this warning on Named Credential and keep losing access to it. Keep getting an Invalid Session-Id error every few hours.

"The authentication provider didn't provide a refresh token. If the access token expires, your org won't be able to access this named credential."

I tried giving Named Credential scope as "refresh_token full" but it failed to authenticate the named credential.

Connect App:
User-added image

Auth Provider:
User-added image

Named Credential:
User-added image

AbhinavAbhinav (Salesforce Developers) 
Have you checked below blog? 


If you face the below issue in Named Credential, make sure Default Scope is set in Auth. Provider.



Tried giving the same scope in Auth provider, still, I'm seeing the warning message in Named Credential.