You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/roles/admin-units-assign-roles.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
9
9
ms.topic: how-to
10
10
ms.subservice: roles
11
11
ms.workload: identity
12
-
ms.date: 03/22/2022
12
+
ms.date: 05/09/2022
13
13
ms.author: rolyon
14
14
ms.reviewer: anandy
15
15
ms.custom: oldportal;it-pro;
@@ -90,17 +90,16 @@ You can assign an Azure AD role with an administrative unit scope by using the A
90
90
91
91
### PowerShell
92
92
93
+
Use the [New-AzureADMSRoleAssignment](/powershell/module/azuread/new-azureadmsroleassignment) command and the `DirectoryScopeId` parameter to assign a role with administrative unit scope.
94
+
93
95
```powershell
94
-
$adminUser = Get-AzureADUser -ObjectId "Use the user's UPN, who would be an admin on this unit"
You can change the highlighted section as required for the specific environment.
103
-
104
103
### Microsoft Graph API
105
104
106
105
Request
@@ -136,13 +135,13 @@ You can view all the role assignments created with an administrative unit scope
136
135
137
136
### PowerShell
138
137
138
+
Use the [Get-AzureADMSScopedRoleMembership](/powershell/module/azuread/get-azureadmsscopedrolemembership) command to list role assignments with administrative unit scope.
139
+
139
140
```powershell
140
-
$adminUnitObj = Get-AzureADMSAdministrativeUnit -Filter "displayname eq 'The display name of the unit'"
0 commit comments