psillar

Results comments of psillar

I am also facing this issue. I can't get the MS account auth to work even with no scopes. Whenever the client returns to the `/signin-microsoft` endpoint it redirects and...

> This should be easy to work around by directly extracting "userPrincipalName" from the JObject User on the context. Could someone please clarify where I should be extracting the `userPrincipalName`?...

Thanks @ShenglinGuo I've just attempted to do it that way but, unfortunately, the `OnAuthenticated` code is never hit :( I'll have to see if I can see any errors in...

Turns out I had missed that the API has been updated (and v3.1 must use that updated version). Once I signed up for a new app account ([https://apps.dev.microsoft.com](https://apps.dev.microsoft.com)) then it...

Oh, with the workaround it works for me - I get the email information that way or am I missing something?

Hi @YovavGad, yes that's the version I'm using. I do the email capture a bit differently, however: ``` var email = context.User["userPrincipalName"]; if (email != null) context.Identity.AddClaim(new Claim(ClaimTypes.Email, email.ToString())); ```

Ok, when I created the app credentials in apps.dev.microsoft.com I selected the 'email' Delegated Permission under Microsoft Graph Permissions. I'm not sure if that makes a difference?