Reputation: 573
I'm trying to get a website up and running where the user has to log in using an Azure AD account. The user themselves are usually either a member of one of two groups. Is there any way within Azure AD of getting that group ID and/or name returned as a claim on the identity token?
Upvotes: 0
Views: 393
Reputation: 58723
You can edit the manifest of the app.
You can find it in the new portal via Azure Active Directory -> App Registrations -> Your app -> Manifest.
Then you need to set the groupMembershipClaims
property to either "SecurityGroup"
or "All"
.
"groupMembershipClaims": "SecurityGroup"
The ids will then be returned in id tokens for your app. SecurityGroup only includes AAD security groups, All also includes Office 365 groups.
Upvotes: 2