I'm trying to get a user groups from the Azure AD. I'm getting a token with these simple lines of code :
if (this.user == null)
user = await AuthenticationManager.DefaultManager.CurrentClient.LoginAsync(this, MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory);
if (user != null)
{
System.Diagnostics.Debug.WriteLine("Token = " + user.MobileServiceAuthenticationToken);
}
When I paste the token in the JWT debugger present on this website : https://jwt.io/ I get some informations (stable_sid, sid, sub, idp, ver, iss, aud, exp, nbf) but I can't seem to get the groups claim in them.
I added in Azured AD the required permissions to read groups for Microsoft graph and Azure active directory but it did not change anything in the tokens.
What am I missing to get the users groups ?
Thank you in advance.
EDIT : Commenter pointed that I forgot to mention that I modified the manifest to "groupMembershipClaims": "SecurityGroup", I also tried "All" but still no claims.