How do I get Address and PhoneNumber from a Microsoft Account login? #60499
Unanswered
DavidThielen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all;
I am using the ASP.NET Core Identity library for my Authentication & Authorization. I've added login using Microsoft or Google accounts and that all works fine.
I'm now trying to get the user's address and phone number if they log in using their Microsoft Account. I've followed the instructions in Microsoft Account external login setup with ASP.NET Core.
I've added the following to my Program.cs:
I set the API permissions adding User.Read.All to the configured permissions. I am guessing I was supposed to do this.
When I go to approve logging in using my Microsoft Account, it does tell me it wants access to me address, phone, etc. And if I remove the
Scope.Add()
calls, it does not tell me it wants the address, phone, etc. So that part is working. It's just not passing that info to thePrincipal.Claims
.When it calls
OnGetCallbackAsync()
inExternalLogin.cshtml.cs
the Principal.Claims is the same standard id, name, email. No address or phone number.??? - thanks - dave
Beta Was this translation helpful? Give feedback.
All reactions