Search code examples
angularmsal-angular

angular msal v2 missing group claims


I'm looking to upgrade my angular app from MSAL v1 to MSAL v2, and one problem I have is the jwt token that the guard adds to requests does not include the group field in the payload anymore. We use group membership to decide who can access what so this is a big blocker of course.

Is there some client side config I'm missing required to get the group claims to show up in the token for MSAL v2 ? I've tried the scopes openid, user.read and profile, not sure if that's even where I should be looking.

Group claims do show up in MSAL v1 tokens, so I'm assuming the Azure config is valid.

EDIT: I'm being told the v1 token seems to be an id_token, and the v2 token is an access_token. Is there a way to get v2 to send the id_token instead of the access_token when using the Guard ?

Thank you


Solution

  • The issue seemed to be the scope, I changed it from 'openid' to my $clientid/openid and it started working.