Unable to get all the azure ad groups details which logged in user is a part of.
I'm using Azure AD login for an app to login with Microsoft credentials and get the groups (and their info) that the user is a part of.
With this line I'm able to get the logged in user: var userClaims = User.Identity as System.Security.Claims.ClaimsIdentity;
With this line I'm unable to get the groups that the user is a part of: var groups = userClaims?.Claims.Where(claim => claim.Type == "groups").Select(c => c.Value);
any idea why? and what will be the fix?
0 Replies