Forum Discussion
Gurdev Singh
Jul 01, 2019Iron Contributor
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.
The latter, multiple calls for each manager up the chain.
- SamueleFurnariCopper Contributoris 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- pvanberloSteel ContributorThis 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.