How to get manager property from user request

Request https://graph.microsoft.com/v1.0/users ? $ select = id & $ expand = manager does not return any information about the manager! (same result using beta)

Is there a solution to get the manager navigation property using the chart API?

+3


source to share


3 answers


This scenario is currently not supported.

You will need to make more than one call to get the manager property.



1) Get a list of users: https://graph.microsoft.com/v1.0/users

2) Get a manager for each user https://graph.microsoft.com/v1.0/users/f6672f23-134d-47a1-8da8-a0671f3cf3f3/manager

+2


source


This seems to work fine on the beta endpoint. Try the following example in Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer :

https://graph.microsoft.com/beta/users?$expand=manager

      



But some other queries don't work as expected, so be careful with select:

https://graph.microsoft.com/beta/users?$expand=manager($select=id,displayName)

      

0


source


This function ($ expand = manager) is currently only supported in / beta. We hope to include it in version 1.0 at the end of this calendar year.

Please use / beta to evaluate this new functionality and let us know your feedback.

0


source







All Articles