The problem is that after these values ββare set, they do not appear in the token obtained by sending the access token to the authentication endpoints until the user logs out and logs in again (which is obviously a pretty terrible user interface after registration).
Could you tell us the details of the request about how you get id_token?
Based on my test, I can get an id_token with an updated statement, as shown below:
1. enter the web application
2. Update the DisplayName using the Azure AD graph as shown below:
POST: https://graph.windows.net/xxxx.onmicrosoft.com/users/{userId}?api-version=1.6 { "displayName":"newValue" }
3. re-request id_token from OAuth2.0 Authorization endpoint using an HTTP request without statement / login (you can also commit an exact request using Fiddler when entering the application)
GET:https://login.microsoftonline.com/xxxx.onmicrosoft.com/oauth2/authorize?client_id={clientId}&redirect_uri={redirectURL}&response_type=id_token&scope=email+openid&response_mode=query&nonce=HWUavSky1PksCJC5Q0xHsw%3d%3d&nux=1&nca=1&domain_hint={XXXX.onmicrosoft.com}
4. the value of the update request is displayed in the new id_token, as expected
To narrow down this problem, you can see if there is a cache for id_token in your application.
source share