Why is the manager/id filter returning only the manager?

Sonia Bounardjian 61 Reputation points
2023-11-17T18:34:37.2933333+00:00

As per the doc page on advanced filters, the filter manager/id should return users who have that manager assigned.

Instead it returns the manager. Is this a bug?

User's image

GET https://gragph.microsoft.com/v1.0/users?$select=id,displayName&$filter=manager/id eq '.....manager's ID..'
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,573 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sourabh Gupta 800 Reputation points Microsoft Vendor
    2023-11-18T15:21:20.02+00:00

    Hi @Sonia Bounardjian

    There seems to be an issue with this advanced filter.

    However, there seems to be a specific API for your use case (to get direct reports)

    https://learn.microsoft.com/en-us/graph/api/user-list-directreports?view=graph-rest-1.0&tabs=http

    GET /users/{id | userPrincipalName}/directReports

    Alternatively you can also use

    GET /users/{id | userPrincipalName}?$expand=directReports

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


0 additional answers

Sort by: Most helpful

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.