-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to look up a user by personal email address? #755
Comments
Hi I don't mean to be impatient but I have been checking this request daily because I really need an answer. If I have posted in the wrong place or not provided sufficient info please let me know. Thanks much! |
This question is much better address on StackOverflow as this isn't an issue with the client library. The first question is not about Microsoft Graph and I don't know the answer for the second question. I suspect that this is an Azure B2C scenario -- what is supported or not is often times a challenge. I don't see any documentation on this scenario. |
I've already posted on a Stackoverflow where the question was ignored, If this is the correct place to ask please reopen the question so a more qualified person can answer. Thanks |
StackOvewflow is the correct place to ask these questions. This repo is specifically for the client library and is not for service API support. The service API folks are more likely to find the questions on StackOverflow. |
This question was also posted on StackOverflow.
I actually have two questions which may possibly be related:
Question 1: Why does user personal email address appear in Azure portal as User Principal Name?
Question 2: How do I look up a user by their personal email address?
The email address I will be looking for is the one used as a sign in name so I expect that it should appear in a property like
signInNames
as is mentioned below.Steps to reproduce:
Log into Azure portal, Look at a random user and observe their User Principal Name.
Note it appears in the format of a personal email address (joe@somedomain.com). Copy the users Object ID.
In code, create a new
GraphServiceClient
and retrive the user by object ID using the Object ID copied in the step above.In the User object that is returned, note the value of UserPrincipalName is not what is shown in Azure portal as noted in the first step. It is instead an assigned identifier: cpim_96fe-48b5-88a2-9ac960a6bdab@mydomain.onmicrosoft.com.
Attempt to find a user using personal email address See also:
As recommended by this answer, this does not work either:
My Azure Application has User.ReadWrite.All permission. Personal email address does not appear as any property value for any object I retrieve.
The text was updated successfully, but these errors were encountered: