logo
search
Others

How to Bulk-Change User Managers in Microsoft Entra ID

Natalie TaylorNatalie Taylor Sep 30, 2026 869 views

Question details

An administrator needs a method to update the manager attribute for multiple users in Microsoft Entra ID (formerly Azure AD) simultaneously.

How to Bulk-Change User Managers in Microsoft Entra ID
Product
Microsoft Entra ID
Device & OS
not provided
Scenario
Updating organization hierarchy or bulk assigning managers for multiple existing Microsoft 365 or Azure users without updating each profile manually.
Observed behavior
The administrator is looking for a graphical portal (GUI) option to perform bulk manager updates, seeking an alternative to writing scripts and commands.
Before you start

Ensure you have the User Administrator or Global Administrator role in Microsoft Entra ID and prepare a CSV file mapping each user's User Principal Name (UPN) to their new manager's UPN.

Solution 1Recommended

Bulk Update Managers Using Microsoft Graph PowerShell and CSV

Since the Microsoft 365 and Entra admin centers do not provide a built-in graphical interface for bulk updating managers, utilizing a CSV file mapped through a Microsoft Graph PowerShell script is the most efficient and officially supported method.

The graphical portal for Microsoft Entra ID currently does not support bulk-changing the manager attribute for multiple users simultaneously. Administrators must rely on Microsoft Graph PowerShell scripts paired with a CSV file to execute these changes programmatically at scale.

1
Prepare the CSV mapping file

Create a CSV file with two distinct columns: 'UserUPN' (containing the email addresses of the users being updated) and 'ManagerUPN' (containing the email addresses of their respective new managers).

2
Connect to Microsoft Graph PowerShell

Open PowerShell as an Administrator and execute the command 'Connect-MgGraph -Scopes User.ReadWrite.All' to securely authenticate with your Microsoft Entra environment.

3
Import the CSV data

Load the CSV file into your PowerShell session by using the 'Import-Csv' cmdlet, assigning it to a variable (e.g., $users = Import-Csv -Path 'C:\path\to\file.csv').

4
Iterate and apply changes

Write a 'foreach' loop to iterate through the CSV data. Within the loop, retrieve the user and manager object IDs based on their UPNs, then execute the 'Set-MgUserManagerByRef' cmdlet to finalize the manager assignment for each user.

Bulk Update Managers Using Microsoft Graph PowerShell and CSV
GUI Limitation Note: There is currently no direct graphical interface (GUI) option available in the Microsoft 365 or Entra portal to bulk update user managers. PowerShell scripting remains the necessary workaround. For advanced environment-specific scripting assistance, consult the Microsoft Azure Q&A forums.
Free Microsoft Office alternative

Manage Your Entra ID CSV Mapping Files Effortlessly with WPS Office

Preparing your user and manager mapping CSV files for PowerShell scripts requires a reliable spreadsheet editor. WPS Office offers a free, lightweight, and fully compatible alternative to Microsoft Office, perfect for managing administrative CSV datasets without the heavy overhead.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open a new blank spreadsheet.
  2. 2. Set up your columns: Type 'UserUPN' in cell A1 and 'ManagerUPN' in cell B1 to set up your directory mapping headers.
  3. 3. Save as CSV: Enter your organizational data, go to Menu > Save As, and choose 'CSV (Comma delimited)' to generate the file needed for your PowerShell script.
Seamless compatibility with Microsoft Excel (.xlsx, .csv) formats.Lightweight architecture that opens large CSV directory mapping files instantly.Familiar spreadsheet interface for effortless data entry and bulk formatting.Completely free to use, minimizing IT overhead for essential administrative tasks.
QA img-9

Frequently Asked Questions

Can I use the Microsoft 365 Admin Center GUI to bulk change managers?

No, the Microsoft 365 Admin Center and the Microsoft Entra admin portal currently only allow changing the manager attribute on an individual user basis. Bulk changes require PowerShell or Graph API.

What administrator roles are required to update user managers in Entra ID?

You need to be assigned the User Administrator or Global Administrator role within Microsoft Entra ID to have the necessary permissions to modify user manager attributes.

Why do I receive an error when running Set-MgUserManagerByRef?

Errors typically occur if the provided User Principal Names (UPNs) in your CSV do not match active directory objects exactly, or if you failed to grant the 'User.ReadWrite.All' permission scope when initially connecting to Microsoft Graph.

Is the Set-AzureADUserManager command still recommended?

While 'Set-AzureADUserManager' was previously used, Microsoft has deprecated the AzureAD PowerShell module. Administrators are strongly advised to migrate to the Microsoft Graph PowerShell SDK for all user management scripts.