0

I am using Named Credential to call Tooling API.

I'm seeing this warning on Named Credential and keep losing access to it. Keep getting 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: enter image description here

Auth Provider: enter image description here

Named Credential: enter image description here

2
  • Your scopes do not match. Connected app should have: Full and Perform requests on your behalf. Auth provider: full refresh_token offline_access
    – identigral
    Sep 22, 2021 at 20:16
  • The advantages of using a Named Cred in this specific use case (SF to SF) are minimal. You can get away with a much simpler setup without compromising security/performance by using the session id (see example)
    – identigral
    Sep 22, 2021 at 20:26

1 Answer 1

0

In your scope, try adding offline_access. I don't fully understand this whole space, but my understanding is that tells the system you're authenticating against to provide you with a refresh token.

You must log in to answer this question.

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