Skip to content

Commit 4b4ee44

Browse files
authored
Update Working-with-Administrative-Units.md
Fixed bug in script, was referencing old DirectoryRole parameter instead of new RoleTemplateId parameter.
1 parent a796fd8 commit 4b4ee44

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

docs-conceptual/azureadps-2.0/Working-with-Administrative-Units.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ New-AzureADUser -UserPrincipalName "EastCoastUserAdmin@$initialDomain" -DisplayN
4040
New-AzureADUser -UserPrincipalName "EastCoastHelpdeskAdmin@$initialDomain" -DisplayName "EastCoastPasswordAdmin" -PasswordProfile $passwordProfile -UsageLocation "US" -AccountEnabled $true -MailNickName "EastCoastPasswordAdmin"
4141
New-AzureADUser -UserPrincipalName "MobileUserAdmin@$initialDomain" -DisplayName "MobileUserAdmin" -PasswordProfile $passwordProfile -UsageLocation "US" -AccountEnabled $true -MailNickName "MobileUserAdmin"
4242
43-
# Enable the Helpdesk Administrator Role
44-
$helpDeskAdminRole = New-Object Microsoft.Open.AzureAD.Model.DirectoryRole
45-
$helpDeskAdminRole.RoleTemplateId = "729827e3-9c14-49f7-bb1b-9608f156bbb8"
46-
Enable-AzureADDirectoryRole -DirectoryRole $helpDeskAdminRole
47-
48-
# Enable the User Account Administrator Role
49-
$userAdminAdminRole = New-Object Microsoft.Open.AzureAD.Model.DirectoryRole
50-
$userAdminAdminRole.RoleTemplateId = "fe930be7-5e62-47db-91af-98c3a49a38b1"
51-
Enable-AzureADDirectoryRole -DirectoryRole $userAdminAdminRole
43+
# Enable the Helpdesk Administrator Role using the templateId GUID for the role
44+
Enable-AzureADDirectoryRole -RoleTemplateId "729827e3-9c14-49f7-bb1b-9608f156bbb8"
45+
46+
# Enable the User Account Administrator Role using the templateId GUID for the role
47+
Enable-AzureADDirectoryRole -RoleTemplateId "fe930be7-5e62-47db-91af-98c3a49a38b1"
5248
5349
```
5450

0 commit comments

Comments
 (0)