Created
April 13, 2019 07:32
-
-
Save OmerMicrosoft/796661fd6cc58c0ab4060a1e9e718473 to your computer and use it in GitHub Desktop.
WVD_AssignTenantCreatorRoleToUser.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$WVDApplication = Get-AzureADServicePrincipal -Filter "displayName eq 'Windows Virtual Desktop'" | |
$ApplicationRole = $WVDApplication.AppRoles | Where-Object { $_.DisplayName -eq 'TenantCreator'} | |
$UserAccount = Get-AzureADUser -ObjectId $AzureAccount.Id | |
New-AzureADUserAppRoleAssignment -ObjectId $UserAccount.ObjectId -PrincipalId $UserAccount.ObjectId -ResourceId $WVDApplication.ObjectId -Id $ApplicationRole.Id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment