How to remove a user's manager in Azure AD using PowerShell scripts

An Azure Active Directory (Azure AD) manager refers to an individual who holds a managerial position in the organization. The manager's role primarily deals with organization hierarchy, access control, and delegation. If there is a change in the management structure, removing the manager for a particular user in Azure AD allows the organization to reflect the current management hierarchy accurately. ADManager Plus, a unified Active Directory, Microsoft 365, Exchange, and Google Workspace management and reporting tool. The PowerShell cmdlet in the table below is used to remove a user's manager in Azure AD.

 Copied
Remove-AzureADUserManager
-ObjectId <ObjectId>
[-InformationAction <ActionPreference>]
[-InformationVariable <Var>]
[<CommonParameters>]
Click to copy entire script

Where <ObjectId> refers to the ID of a user, <RoleId> refers to the ID of an application role assignment, <ActionPreference> describes the way in which this cmdlet reacts to an information event, and <var> refers to the information variable.

Limitations of using PowerShell scripts to remove a user's manager in Azure AD

  • Administrators must have sufficient permissions to modify attributes of Azure AD users if they wish to use the above-mentioned PowerShell script.
  • Only technicians with PowerShell expertise can execute this command.
  • PowerShell scripts are time-consuming and can affect productivity.

About ManageEngine ADManager Plus

ManageEngine ADManager Plus is a unified Active Directory (AD), Microsoft 365, Exchange, and Google Workspace management and reporting solution. It comes with predefined management actions that can be executed at the click of a button and more than 200 reports to report on your AD comprehensively. ADManager Plus' automation capabilities allows you to automate mundane and routine AD tasks, associate workflows to them, and have them executed at a defined frequency. ADManager Plus comes with an intuitive UI and does not demand an extensive knowledge in PowerShell. It also lets you securely delegate tasks to technicians and non-admin users. ADManager Plus can be integrated with enterprise applications to holistically manage your AD environment. To learn more about ADManager Plus, click here

Simplify Azure AD management and reporting with ADManager Plus

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link