How to find the manager of a user in Microsoft Entra ID using Get-MgUserManager

Finding the manager of a user in Microsoft Entra ID

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.

  • ADManager Plus
  • PowerShell
 

Find the manager of a user in Microsoft Entra ID using ADManager Plus

  1. Log in to ADManager Plus and navigate to Microsoft 365 > Reports > User Reports.
  2. Under General User Reports, click Microsoft 365 Users.
  3. Select the desired Microsoft 365 tenant from the Microsoft 365 Tenant drop-down list.
  4. Select the desired groups or domains whose users you would like to fetch in the Filter By pop-up and click Generate Now.
  5. The manager of a user can be viewed under the Manager column.
Find the manager of a user in Microsoft Entra ID using ADManager Plus' predefined reports
 
 

Export reports in multiple formats, including HTML, CSV, and PDF.

 
 

Schedule automatic report generation.

 
 

Instantly assign or revoke Microsoft 365 licenses.

Finding the manager of a user in Microsoft Entra ID using Microsoft Graph PowerShell

Prerequisites

Before using the Get-MgUserManager cmdlet, ensure the following:

  • The Microsoft Graph PowerShell module is installed. If not, install it using this script:
    Install-Module Microsoft.Graph -Scope CurrentUser
  • Connect to Microsoft Graph PowerShell with the required permissions to find a user's manager in Microsoft Entra ID with this script:
    Connect-MgGraph -Scopes "User.Read.All"

Using the Get-MgUserManager command to find a user's manager in Microsoft Entra ID

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

An example use case using the Get-MgUserManager cmdlet

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.

Supported parameters

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.

Limitations of using Graph PowerShell scripts to find the manager of a user in Microsoft Entra ID

  • Graph PowerShell requires IT admins to upgrade from Azure AD PowerShell and have familiarity with PowerShell scripting.
  • The Microsoft Graph API imposes throttling limits, which may affect performance when fetching the managers of users in bulk.
  • The scripts may require extra effort to format and export data for reporting purposes.
  • Technical expertise is needed to troubleshoot errors.
  • The lack of an intuitive interface makes the overall experience less user-friendly, particularly for those new to scripting.

Highlights of using ADManager Plus to find the manager of a user in Microsoft Entra ID

  • Intuitive interface that streamlines the report generation process.
  • Comprehensive and customizable reports with options to schedule and automate report generation.
  • Supports on-the-fly management actions to manage users instantly.
  • Optimized for large-scale environments and does not require any scripts for bulk operations.
  • Export reports in various formats, such as CSV or HTML, in a few clicks.

Find the manager of a user in Microsoft Entra ID effortlessly with ADManager Plus

 
  • Fetch manager of a user in Microsoft Entra ID using ADManager Plus
  • Finding the manager of a user in Microsoft Entra ID using Microsoft Graph PowerShell
  • Limitations of using Graph PowerShell scripts to get manager of a user in Microsoft Entra ID
  • Highlights of using ADManager Plus to get manager of a user in Microsoft Entra ID
The one-stop solution to Active Directory Management and Reporting
Email Download Link