userPrincipleName

Joshua Chung 21 Reputation points Microsoft Employee
2020-06-01T16:28:21.547+00:00

Hello,

I'm in need of an API where I can run something like GET /users/"Joshua Chung" and then all users who have a match to the name (Joshua Chung) will get listed along with the user's UPN.

Is there an API that allows this type of feature?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,800 questions
0 comments No comments
{count} votes

Accepted answer
  1. Saurabh Sharma 23,761 Reputation points Microsoft Employee
    2020-06-02T01:34:07.407+00:00

    You can use Microsoft Graph API endpoint https://graph.microsoft.com/v1.0/users and use $filter query parameter to get list of users which meets the filter criteria. For example - To get users having display name starts with "Joshua Chung", the syntax is as follows:

    GET https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Joshua Chung')  
    

    Please refer to the documentation to know more about using Microsoft Graph Users endpoint. Also, refer to documentation to learn more about Query parameters.

    You can also refer to Microsoft Graph auth overview to get the authorization tokens and Use the Microsoft Graph API to use tokens for calling Microsoft Graph REST API's. You can also use Microsoft Graph Explorer
    to test requests using Microsoft Graph APIs.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful