masu9
masu9

Reputation: 511

How to get user details using the 'alternate email' attribute in Azure AD Graph API

I have a user in my B2C tenant that has an alternate email present. I would like to retrieve this user's details (specifically the 'signInNames' array) using the 'alternate email' property from the B2C Tenant. I believe this is also known as 'otherMails' when used by Graph API.

I am also using the graph.windows.net URL for the API. If possible, I would like to keep using this URL. If the graph.microsoft.com has a solution for this though, I would like to know about it.

Upvotes: 1

Views: 2736

Answers (1)

Joy Wang
Joy Wang

Reputation: 42133

Try the query as below in the AAD Graph Explorer, it works fine on my side.

GET https://graph.windows.net/myorganization/users?$filter=otherMails/any(c:c eq '[email protected]')

enter image description here

Upvotes: 2

Related Questions