Apr 23 2020 08:20 AM - edited Apr 23 2020 08:21 AM
Hi I get the following error message when trying to "Create a role assignment in Windows Virtual Desktop" it states my tenant name is incorrect.
PS C:\WINDOWS\system32> Get-RdsTenant
TenantGroupName : Default Tenant Group
AadTenantId : f346aa47-8272-4126-b200-92d230699ec3
TenantName : CloudscapetestingWVDtenant
Description :
FriendlyName :
SsoAdfsAuthority :
SsoClientId :
SsoClientSecret :
SsoClientSecretType : SharedKey
AzureSubscriptionId : a9720ae9-8b8c-4f50-b4de-11cecb2bb5ff
LogAnalyticsWorkspaceId :
LogAnalyticsPrimaryKey :
PS C:\WINDOWS\system32> $myTenantName = CloudscapetestingWVDtenant
New-RdsRoleAssignment -RoleDefinitionName "RDS Owner" -ApplicationId $svcPrincipal.AppId -TenantName $myTenantName
CloudscapetestingWVDtenant : The term 'CloudscapetestingWVDtenant' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:17
+ $myTenantName = CloudscapetestingWVDtenant
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (CloudscapetestingWVDtenant:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
New-RdsRoleAssignment : Cannot bind argument to parameter 'TenantName' because it is null.
At line:2 char:102
+ ... S Owner" -ApplicationId $svcPrincipal.AppId -TenantName $myTenantName
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-RdsRoleAssignment], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.RDInfra.RDPowershell.Authorization.NewRdsRoleAssignment
Could you please help with a fix for this?
Apr 23 2020 10:42 AM
Apr 24 2020 01:26 AM
@FortyMegabytes- Thankyou that worked