Forum Discussion

Gurdev Singh's avatar
Gurdev Singh
Iron Contributor
Jul 01, 2019

Microsoft Graph API: Get Users manager chain

Is there a way to get user's manager chain using Graph API, all the way to company CEO? or we'll have to make multiple calls for each manager.

    • SamueleFurnari's avatar
      SamueleFurnari
      Copper Contributor
      is the answer still valid? In the official docs (https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0) I read that the graph API exhibits an endpoint to get all manager chain but I can't feagure out how to use it... I tried Graph explorer and C# script but the result returns always the first level manager. I don't know if the endpoint does not works or if the problem is in my app permissions (as for now the app has Directory.ReadWrite.All and User.ReadWrite.All)

      Thanks
      • pvanberlo's avatar
        pvanberlo
        Steel Contributor
        This actually works, however, when getting the chain of managers, please add the "consistencyLevel: eventual" header to the request, otherwise it will only return the direct manager.

Resources