myApplication
authenticates and fetch a JWT access token
from Azure AD
. BackendSystem
is authorizing myApplication
based on the claims in JWT access token
.
Decoded JWT
{
"aud": "abc",
"iss": "https://sts.windows.net/6xxxf/",
"iat": 1721983095,
"nbf": 1721983095,
"exp": 1721986995,
"aio": "Exx=",
"appid": "ID",
"appidacr": "x",
"idp": "https://sts.windows.net/6xxxf/",
"oid": "1xxx2",
"rh": "0xxx.",
"roles": [
"roles"
],
"sub": "1xxx2",
"tid": "TID",
"uti": "YxxA",
"ver": "xxx"
}
In this list of claims, I would like to add a new custom claim Example
which is not part of the additional standard claims that are offered by Azure AD.
New JWT:
{
"aud": "abc",
"iss": "https://sts.windows.net/6xxxf/",
"iat": 1721983095,
"nbf": 1721983095,
"exp": 1721986995,
"aio": "Exx=",
"appid": "ID",
"appidacr": "x",
"idp": "https://sts.windows.net/6xxxf/",
"oid": "1xxx2",
"rh": "0xxx.",
"roles": [
"roles"
],
"sub": "1xxx2",
"tid": "TID",
"uti": "YxxA",
"ver": "xxx",
"Example": "abc-123"
}
I’m new to Azure AD and found option to add only the optional standard claims (given_name, family_name, etc.) offered by Azure AD. How can I implement this?
Please note: This is not for SSO. myApplication
will not be sending this additional custom claim in the request to Azure AD
.