{"id":5224,"date":"2019-03-20T22:27:14","date_gmt":"2019-03-20T22:27:14","guid":{"rendered":"http:\/\/blogs.aaddevsup.xyz\/?p=5224"},"modified":"2022-05-04T15:29:21","modified_gmt":"2022-05-04T15:29:21","slug":"using-groups-claim-in-azure-active-directory","status":"publish","type":"post","link":"https:\/\/blogs.aaddevsup.xyz\/2019\/03\/using-groups-claim-in-azure-active-directory\/","title":{"rendered":"Using “groups” claim in Azure Active Directory"},"content":{"rendered":"

Lets get Started!<\/h3>\n

To enable the return of groups in a claim, there are two ways…<\/p>\n

    \n
  1. Use the application registration manifest by enabling the groupMembershipClaims<\/strong> property…
    \nhttps:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/reference-app-manifest<\/a><\/li>\n
  2. or if it’s a SAML application, you can enable it though the SSO configuration.<\/li>\n<\/ol>\n

    The steps on enabling groups claim is outlined in the following article…
    \n
    https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/hybrid\/how-to-connect-fed-group-claims<\/a><\/p>\n

    Once enabled, groups will now be returned in the “groups” claim within a access token or ID token using OpenID Connect.<\/p>\n


    \n

    Important Note:<\/strong><\/p>\n

    Id tokens<\/strong> will only contain the groups claim if the openid<\/strong> value is included in the scope<\/strong> parameter.<\/p>\n


    \n

    When using, the Azure Active Directory Authentication library (ADAL<\/strong>) for dotnet, by default you may not get the groups claim. You may need to add the scope<\/strong> claim with the openid<\/strong> value as an ExtraQueryParameter<\/strong>.<\/p>\n


    \n

    Moving forward…<\/strong><\/p>\n

    The following groups claim description comes from https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/access-tokens<\/a><\/p>\n

    Provides object IDs that represent the subject’s group memberships. These values are unique (see Object ID) and can be safely used for managing access, such as enforcing authorization to access a resource. The groups included in the groups claim are configured on a per-application basis, through the groupMembershipClaims property of the <\/em>application manifest<\/em><\/a>. A value of null will exclude all groups, a value of “SecurityGroup” will include only Active Directory Security Group memberships, and a value of “All” will include both Security Groups and Office 365 Distribution Lists.<\/em><\/p>\n