MS graph API to query user by user display name instead of id

MS Techie 2,751 Reputation points
2024-01-24T17:00:38.3666667+00:00

We have the Microsoft graph API to fetch user details by user id. How to fetch user details by display name of the user. I tried this query, but it returns all names having that exact word. GET https://graph.microsoft.com/v1.0/users?$filter=displayName eq 'ExactDisplayName'. I want single row which has exact value, but it returns many rows which are approximately matching rows

Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Akash Jadav 85 Reputation points Microsoft External Staff
    2024-01-28T07:09:17.1733333+00:00

    Hello MS Techie,

    GET v1.0 https://graph.microsoft.com/v1.0/users?$filter=displayName eq 'ExactDisplayName'

    The above API is expected to return the exact matched user. Please provide some logs or screenshots for the issue you are facing. If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Regards,
    Akash

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.