I'm making a callout to our backend using Named Credentials with the OAuth 2.0 Browser Flow. After setting it up, I ran a test in the Developer Console.

Here's the log:

15:49:02:346 NAMED_CREDENTIAL_REQUEST NamedCallout[Named Credential Id=0XAH4000000L7Kq, Named Credential Name=OAuth, Endpoint=......, Method=POST, External Credential Type=EXTERNAL, HTTP Header Authorization=Method: Bearer - Credential: 747c6dfaa850f981f7ef0322c3de105a428ddc6392ab15528559d931759f36a8, Content-Type=null, Request Size bytes=-1, Retry on 401=True]

As I understand, the Authorization header is Bearer 747c6dfaa850f981f7ef0322c3de105a428ddc6392ab15528559d931759f36a8.

However, the value747c6dfaa850f981f7ef0322c3de105a428ddc6392ab15528559d931759f36a8 doesn't look like a typical ID token (which include 3 part) or access token (which is formatted as <id>!<session>) from OAuth. Could you clarify what format this is and what exactly it represents? enter image description here

  • Also, is there anyway to append Authorization header = ID TOKEN?
    – vctqs1
    Commented May 21 at 11:11
  • Even if the ID token was issued by your authorization service, it's not the same thing as the access token. The latter goes into Authorization header, that's what oAuth protocol dictates. If your endpoint needs the ID token, 1) it's not oAuth compliant 2) unfortunately there's no out of the box way to grab it but it's possible with custom code. See salesforce.stackexchange.com/questions/359002/… for more info
    – identigral
    Commented May 21 at 16:20
  • @identigral Ok thank you. However, I am experiencing an issue where the Auth Provider with Named Credential is not refreshing the token even after it has expired. This seems similar to the problem discussed here: salesforce.stackexchange.com/questions/400729/…. Do you know how to fix this?
    – vctqs1
    Commented May 23 at 2:04
  • Please post a new question with details or upvote and follow the one you reference if your problem is exactly the same
    – identigral
    Commented May 23 at 3:32


You must log in to answer this question.