how to get group information as part of claims in JWT token?
how to get group information as part of claims in JWT token?
Hi @TetopaKundeti-4071 · Thank you for reaching out.
For this purpose, you need to navigate to Azure AD > App Registration > Open the app that you want to configure the token for and use below option:

If you configure group information to be passed in Access token, below parameters gets added in the application manifest:
"optionalClaims": {
"accessToken": [{
"name": "groups",
"additionalProperties": ["dns_domain_and_sam_account_name"]
}]
}
If you configure Group information to be passed in ID token, below parameters are added:
"optionalClaims": {
"idToken": [{
"name": "groups",
"additionalProperties": ["netbios_domain_and_sam_account_name", "emit_as_roles"]
}]
}
You can directly add these parameters in the Manifest as well.
Read more: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
Thanks for your reply Aman.
I will implement the same and try to fetch group name as part of claims in input token
Hi @TetopaKundeti-4071 · Have you had a chance to test it out?
@amanpreetsingh-msft - just an FYI, the correct property name in the second sample is actually netbios_domain_and_sam_account_name and not netbios_name_and_sam_account_name
@NickLudwig-2074 · Thank you for pointing that out. I have updated my answer.
17 people are following this question.