简体   繁体   中英

Azure API Management - Customize Token

When calling the token endpoint to get an Azure API access token, I want to pass in extra information to be included in the token. Is that possible?

For example, I want to pass in a locationID to the body when calling:

https://login.microsoftonline.com/\ /oauth2/v2.0/token

Then I want this locationID to be encoded in the token that I get back.

You can use optional claims in Azure AD applications to specify which claims you want in tokens sent to the application.

we can only get the claims with access tokens but we cannot send any extra information like locationID while calling the access token.

The following are few of the v2.0-only optional claims which can be requested along with access tokens:

  • ipaddr
  • onprem_sid
  • pwd_exp

For complete list of v2.0-specific optional claims set you can refer this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM