Microsoft Graph API: Get Users manager chain

%3CLINGO-SUB%20id%3D%22lingo-sub-731943%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%20API%3A%20Get%20Users%20manager%20chain%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-731943%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20latter%2C%20multiple%20calls%20for%20each%20manager%20up%20the%20chain.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-730591%22%20slang%3D%22en-US%22%3EMicrosoft%20Graph%20API%3A%20Get%20Users%20manager%20chain%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-730591%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20a%20way%20to%20get%20user's%20manager%20chain%20using%20Graph%20API%2C%20all%20the%20way%20to%20company%20CEO%3F%20or%20we'll%20have%20to%20make%20multiple%20calls%20for%20each%20manager.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-730591%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Graph%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Contributor

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.

4 Replies

The latter, multiple calls for each manager up the chain.

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
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.

@pvanberlo Thank you! Yesterday, just five minutes later the post on tech community, I opened a case to Microsoft... the customer service responded quikly and asked me to set the header...

I have seen the documentation so many times but I have not noticed the header :)

Thanks to the header from Graph explorer works well, now I need to get it to works with the .NET SDK.

Thanks again!