Id_Token does not have oid information when generating thourgh postman otherwise in our application we are getting it

Surinder Singh 26 Reputation points
2022-04-23T12:53:10.657+00:00

I am using postman authorization 2.0 to fetch access and Id token. I am getting both id_token and accessToken using grant type authorization code in postman. There are below two issues I am facing

Problem is when I am parsing access token in jwt.io it says invalid signature.

And for id_token I am getting roles and other information but I am not getting oid(user object id) in it.

All these are working fine in my SPA(single page application). I am getting Idtoken with oid and access token has valid signature.

Postman Configuration:
195901-postmanconfiguration.jpg

AppRegistrationConfiguration:
195867-appregistrationconfig.jpg

Can you please suggest ?

Regards
Surinder

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,793 questions
{count} votes

Accepted answer
  1. Shweta Mathur 29,746 Reputation points Microsoft Employee
    2022-04-25T04:47:06.247+00:00

    Hi @Surinder Singh ,

    Thanks for reaching out.

    I understand you are not getting "oid claim" when you are retrieving the access token using postman.

    As mentioned in your screenshot, only scope requested by you is openid. To get the "oid claim" in the access token, will also need to request for profile scope.

    As documented here,

    "Because the oid allows multiple apps to correlate principals, the profile scope is required in order to receive this claim for users."

    Also, there might be chance you are passing profile scope in your application and missed the same in postman due to which you are getting different results.

    Hope this will help.

    Please remember to "Accept Answer" if answer helped you.

    Thanks,
    Shweta

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.