IT admins are often tasked with finding the manager of a user for compliance and audit purposes. While Graph PowerShell's Get-MgUserManager command, an alternative to the Get-AzureADUserManager command, can be used to obtain and export manager details of a user in Microsoft Entra ID, its complexity and non-intuitive interface makes it a challenging option. On the other hand, ADManager Plus, a Microsoft 365 management and reporting tool, simplifies the process, allowing admins to quickly generate and export the manager details of a user in just a few clicks.
Export reports in multiple formats, including HTML, CSV, and PDF.
Schedule automatic report generation.
Instantly assign or revoke Microsoft 365 licenses.
Before using the Get-MgUserManager cmdlet, ensure the following:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "User.Read.All"
The Get-MgUserManager cmdlet can be used in Microsoft Graph PowerShell to find a user's manager in Microsoft Entra ID. Here's the syntax:
Get-MgUserManager
-UserId <String>
[-ExpandProperty <String[]>]
[-Property <String[]>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
Finding the manager of a particular user
Get-MgUserManager -UserId <'user_id'>
In this command, replace user_id with the user's ID for whom you would like to view the manager.
The following table contains some parameters that can be used along with the Get-MgUserManager command to find the manager of a user in Microsoft Entra ID efficiently.
| Parameters | Description |
|---|---|
| -UserId | This parameter retrieves the manager of a user based on their unique identifiers, such as user principal name or object ID. |
| -Property | This parameter retrieves specific attributes of a user's manager. |