Created
April 13, 2019 07:34
-
-
Save OmerMicrosoft/d78616284fbae6e58aa762ddf10a1ebc to your computer and use it in GitHub Desktop.
Assign the 'TenantCreator' role to a selected user for WVD (Windows Virtual Desktop)
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