Let's extend command aad user get with the possibility to retrieve the manager. It is possible to retrieve the direct manager, or retrieve the whole manager tree to the top.
Options to add
| Option |
Description |
--withManager |
Retrieve the direct manager for the user. |
API request
https://learn.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http
We can get the manager by expanding the manager property on the user object.
Since the whole user object of the manager is returned, the response becomes huge. Therefore I suggest that we only show:
- UPN
- Display Name
- ID
- Email
of the manager. Let's use this as select query in the request.
Let's extend command
aad user getwith the possibility to retrieve the manager. It is possible to retrieve the direct manager, or retrieve the whole manager tree to the top.Options to add
--withManagerAPI request
https://learn.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http
We can get the manager by expanding the
managerproperty on the user object.Since the whole user object of the manager is returned, the response becomes huge. Therefore I suggest that we only show:
of the manager. Let's use this as select query in the request.