List manager

Namespace: microsoft.graph

Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.Read.All, User.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application User.Read.All, User.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All

When an application queries a relationship that returns a directoryObject type collection, if it does not have permission to read a certain derived type (like device), members of that type are returned but with limited information. With this behaviour applications can request the least privileged permissions they need, rather than rely on the set of Directory.* permissions. For details, see Limited information returned for inaccessible member objects.

HTTP request

Get the manager:

GET /me/manager
GET /users/{id | userPrincipalName}/manager

Get the management chain:

GET /me?$expand=manager
GET /users?$expand=manager($levels=n)
GET /users/{id | userPrincipalName}/?$expand=manager($levels=n)

Optional query parameters

This method supports the $select and $expand OData query parameters to help customize the response.

Note:

  • The n value of $levels can be max (to return all managers) or a number between 1 and 1000.
  • When the $levels parameter is not specified, only the immediate manager is returned.
  • You can specify $select inside $expand to select the individual manager's properties. The $levels parameter is required: $expand=manager($levels=max;$select=id,displayName).

Request headers

Header Value
Authorization Bearer {token}. Required.
ConsistencyLevel eventual. Required when the request includes the $count=true query string.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a directoryObject object in the response body.

Examples

Example 1: Get manager

The following example shows a request to get the manager.

Request

GET https://graph.microsoft.com/v1.0/users/{id|userPrincipalName}/manager

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "7d54cb02-aaa3-4016-9f9c-a4b49422dd9b",
  "displayName": "Sara Davis",
  "jobTitle": "Finance VP",
  "mail": "SaraD@contoso.onmicrosoft.com",
  "userPrincipalName": "SaraD@contoso.onmicrosoft.com"
}

Example 2: Get manager chain up to the root level

The following example shows a request to get the manager chain up to the root level. This request requires the ConsistencyLevel header set to eventual because $count=true query string is in the request. For more information about the use of ConsistencyLevel and $count, see Advanced query capabilities on Azure AD directory objects.

Request

GET https://graph.microsoft.com/v1.0/me?$expand=manager($levels=max;$select=id,displayName)&$select=id,displayName&$count=true
ConsistencyLevel: eventual

Response

The following is an example of the response. Transitive managers are displayed hierarchically.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "a97733ce-92a4-4e7e-8d45-8e1f3e6a69d8",
  "displayName": "Individual Contributor",
  "manager": {
    "id": "7d54cb02-aaa3-4016-9f9c-a4b49422dd9b",
    "displayName": "Alex Wilber",
    "manager": {
      "id": "343a3f95-377c-47a9-b697-480487bfcdf7",
      "displayName": "Bianca Pisani",
      "manager": {
        "id": "8e07b731-5ba7-4081-b482-15e6eca35c45",
        "displayName": "Patti Fernandez"
      }
    }
  }
}