1 year ago

#372560

test-img

kamilz

Azure AD B2C - authorization code grant, profile_info response

I'm using Azure AD B2C with Authorization code grant. In the response after exchaning code for token, there is additional property profile_info with JSON encoded as Base64.

{
    "id_token": "<id-token>",
    "token_type": "Bearer",
    "not_before": 1649069525,
    "id_token_expires_in": 3600,
    "profile_info": "eyJ2ZXIiOiIxLjAiLCJ0aWQiOiI5ZTAzN2IxNi05NzJmLTRmZWQtYmEyOC03MjU5MzJmOTNmNmQiLCJzdWIiOm51bGwsIm5hbWUiOm51bGwsInByZWZlcnJlZF91c2VybmFtZSI6bnVsbCwiaWRwIjpudWxsfQ",
    "scope": "openid"
}

I couldn't find any explanation in the docs what is the reasoning behind profile_info. In my case almost all properties in profile_info JSON are nulls.

{
  "ver": "1.0",
  "tid": "9e037b16-972f-4fed-ba28-725932f93f6d",
  "sub": null,
  "name": null,
  "preferred_username": null,
  "idp": null
}

Where are these values coming from? Are claims in profile_info and their values configurable using custom policy? What's the intended use case for profile_info vs id_token?

azure-ad-b2c

azure-ad-b2c-custom-policy

aad-b2c

0 Answers

Your Answer

Accepted video resources