Skip to content

Latest commit

 

History

History
174 lines (112 loc) · 7.52 KB

File metadata and controls

174 lines (112 loc) · 7.52 KB
title Create or delete administrative units
description Create administrative units to restrict the scope of role permissions in Microsoft Entra ID.
ms.topic how-to
ms.date 01/03/2025
ms.reviewer anandy
ms.custom oldportal, it-pro, no-azure-ad-ps-ref, sfi-image-nochange

Create or delete administrative units

Administrative units let you subdivide your organization into any unit that you want, and then assign specific administrators that can manage only the members of that unit. For example, you could use administrative units to delegate permissions to administrators of each school at a large university, so they could control access, manage users, and set policies only in the School of Engineering.

This article describes how to create or delete administrative units to restrict the scope of role permissions in Microsoft Entra ID.

Prerequisites

  • Microsoft Entra ID P1 or P2 license for each administrative unit administrator
  • Microsoft Entra ID Free licenses for administrative unit members
  • Privileged Role Administrator role
  • Microsoft Graph PowerShell module when using PowerShell
  • Admin consent when using Graph Explorer for Microsoft Graph API

For more information, see Prerequisites to use PowerShell or Graph Explorer.

Create an administrative unit

You can create a new administrative unit by using either the Microsoft Entra admin center, Microsoft Entra PowerShell, or Microsoft Graph.

  1. Sign in to the Microsoft Entra admin center as at least a Privileged Role Administrator.

  2. Browse to Entra ID > Roles & admins > Admin units.

    :::image type="content" source="./media/admin-units-manage/nav-to-admin-units.png" alt-text="Screenshot of the Administrative units page." lightbox="./media/admin-units-manage/nav-to-admin-units.png":::

  3. Select Add.

  4. In the Name box, enter the name of the administrative unit. Optionally, add a description of the administrative unit.

  5. If you don't want tenant-level administrators to be able to access this administrative unit, set the Restricted management administrative unit toggle to Yes. For more information, see Restricted management administrative units.

    :::image type="content" source="./media/admin-units-manage/add-new-admin-unit.png" alt-text="Screenshot showing the Add administrative unit page and the Name box for entering the name of the administrative unit." lightbox="./media/admin-units-manage/add-new-admin-unit.png":::

  6. Optionally, on the Assign roles tab, select a role and then select the users to assign the role to with this administrative unit scope.

    :::image type="content" source="./media/admin-units-manage/assign-roles-admin-unit.png" alt-text="Screenshot showing the Add assignments pane to add role assignments with this administrative unit scope." lightbox="./media/admin-units-manage/assign-roles-admin-unit.png":::

  7. On the Review + create tab, review the administrative unit and any role assignments.

  8. Select the Create button.

Use the Connect-MgGraph command to sign in to your tenant and consent to the required permissions.

Connect-MgGraph -Scopes "AdministrativeUnit.ReadWrite.All"

Use the New-MgDirectoryAdministrativeUnit command to create a new administrative unit.

$params = @{
    DisplayName = "Seattle District Technical Schools"
    Description = "Seattle district technical schools administration"
    Visibility = "HiddenMembership"
}
$adminUnitObj = New-MgDirectoryAdministrativeUnit -BodyParameter $params

Use the New-MgDirectoryAdministrativeUnit command to create a new restricted management administrative unit. Set the IsMemberManagementRestricted property to $true.

$params = @{
    DisplayName = "Contoso Executive Division"
    Description = "Contoso Executive Division administration"
    Visibility = "HiddenMembership"
    IsMemberManagementRestricted = $true
}
$restrictedAU = New-MgDirectoryAdministrativeUnit -BodyParameter $params

Use the Create administrativeUnit API to create a new administrative unit.

Request

POST https://graph.microsoft.com/v1.0/directory/administrativeUnits

Body

{
  "displayName": "North America Operations",
  "description": "North America Operations administration"
}

Use the Create administrativeUnit API to create a new restricted management administrative unit. Set the isMemberManagementRestricted property to true.

Request

POST https://graph.microsoft.com/v1.0/directory/administrativeUnits

Body

{ 
  "displayName": "Contoso Executive Division",
  "description": "This administrative unit contains executive accounts of Contoso Corp.", 
  "isMemberManagementRestricted": true
}

Delete an administrative unit

In Microsoft Entra ID, you can delete an administrative unit that you no longer need as a unit of scope for administrative roles. Before you delete the administrative unit, you should remove any role assignments with that administrative unit scope.

  1. Sign in to the Microsoft Entra admin center as at least a Privileged Role Administrator.

  2. Browse to Entra ID > Roles & admins > Admin units.

  3. Select the administrative unit you want to delete.

  4. Select Roles and administrators, and then open a role to view the role assignments.

  5. Remove all the role assignments with the administrative unit scope.

  6. Browse to Entra ID > Roles & admins > Admin units.

  7. Add a check mark next to the administrative unit you want to delete.

  8. Select Delete.

    :::image type="content" source="./media/admin-units-manage/select-admin-unit-to-delete.png" alt-text="Screenshot of the administrative unit Delete button and confirmation window." lightbox="./media/admin-units-manage/select-admin-unit-to-delete.png":::

  9. To confirm that you want to delete the administrative unit, select Yes.

Use the Remove-MgDirectoryAdministrativeUnit command to delete an administrative unit.

$adminUnitObj = Get-MgDirectoryAdministrativeUnit -Filter "DisplayName eq 'Seattle District Technical Schools'"
Remove-MgDirectoryAdministrativeUnit -AdministrativeUnitId $adminUnitObj.Id

Use the Delete administrativeUnit API to delete an administrative unit.

DELETE https://graph.microsoft.com/v1.0/directory/administrativeUnits/{admin-unit-id}

Next steps