Missing group claims in access token

Mihai 10 Reputation points
2023-08-11T13:19:38.8566667+00:00

Hello,

Long story: I am trying to setup Azure as an OIDC IdP to Okta.

This was successful.

I am trying to map the group claims, to the Okta user profile, which I am having a hard time doing so.

I opened up a support case with Okta, and they are asking for the Access token Payload.

Using the following document: https://learn.microsoft.com/en-us/azure/databricks/dev-tools/app-aad-token, I was able to get an access token and used https://jwt.io to decode.

And as per: https://learn.microsoft.com/en-us/azure/active-directory/develop/access-token-claims-reference, i should see the groups claim in the access token, the user that signed in and generated that token has only 1 group assigned to him.

The token has the following load:

{
  "aud": "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d",
  "iss": "https://sts.windows.net/d667a24e-91f8-4dfa-9999-ee6e5bbf2390/",
  "iat": 1691758952,
  "nbf": 1691758952,
  "exp": 1691763068,
  "acr": "1",
  "aio": "ATQAy/8UAAAA8Mn0Hcd/2tc6J6S8UlTxMcSbpwVRln86TcIIfNDehUcuXfNEJ/ghIVT9W381qjvH",
  "amr": [
    "pwd"
  ],
  "appid": "babcc718-f046-4ade-ba15-f421e94ae162",
  "appidacr": "1",
  "family_name": "DISPLAY",
  "given_name": "NAME",
  "ipaddr": "2a02:2f0e:dd0a:8a00:acc1:dedb:20db:2d81",
  "name": "DISPLAY NAME",
  "oid": "c3be473b-8e29-4175-a33d-be4783896f42",
  "puid": "10032002D44BB2C3",
  "rh": "0.AU8ATqJn1viR-k2Zme5uW78jkKYU-C8EM7hKhcvNDm-HnB1PAOM.",
  "scp": "user_impersonation",
  "sub": "xtwOHyMcQOwHucCXVBNFffoSn6SnIhou8y3QzpVjUDs",
  "tid": "d667a24e-91f8-4dfa-9999-ee6e5bbf2390",
  "unique_name": "ACCOUNTUPN",
  "upn": "ACCOUNTUP",
  "uti": "LRtxwcRJhUOqo1mGTvOZAA",
  "ver": "1.0"
}

Under Token Configuration, I added groups claim using Group ID for ID, Access and SAML token. But as you can see, there is no group claim in the access token.

In Azure AD, made sure that in the manifest I made sure to have this.

groupMembershipClaims": "All, ApplicationGroup"
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    2023-08-18T06:12:11.2233333+00:00

    Hello @Mihai , in order to obtain the groups claim included in your access token you need to enable them as optional claims. In your app manifest ensure the following content is present. Also, you need to request an access token for your app (which will become the resource), not just trough it (as a client).

    {
        "optionalClaims": {
            "accessToken": [
                {
                    "name": "groups",
                    "source": null,
                    "essential": false,
                    "additionalProperties": []
                }
            ]
        }
    }
    

    Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.