Hello,
I am trying to set multiple roles for an Identity but it seems Grant-RsRestItemAccessPolicy cannot handle this?
e.g. the identity does not exist yet:
Grant-RsRestItemAccessPolicy -Identity <myuser> -Role 'Browser' -Path <mypath>;
Grant-RsRestItemAccessPolicy -Identity <myuser> -Role 'Content Manager' -Path <mypath>;
Second line throws:
The policy for <myuser> user or group is not valid. The role assignment is either empty, specifies a user or group name that is already used in an existing role assignment for the current item, or specifies duplicate roles for the same user or group.
And it seems there is no way how I can pass multiple role names in one call based on the function definition. I also cannot pass an array with role names.
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $true)]
[Alias('RoleName')]
[ValidateSet("Browser","Content Manager","My Reports","Publisher","Report Builder")]
[string]
$Role,
https://github.com/microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/Security/Rest/Grant-RsRestItemAccessPolicy.ps1
Is there another way how to set multiple roles I am not aware of?
I am using PowerBI Reporting Server January 2026
Hello,
I am trying to set multiple roles for an Identity but it seems Grant-RsRestItemAccessPolicy cannot handle this?
e.g. the identity does not exist yet:
Second line throws:
The policy for <myuser> user or group is not valid. The role assignment is either empty, specifies a user or group name that is already used in an existing role assignment for the current item, or specifies duplicate roles for the same user or group.And it seems there is no way how I can pass multiple role names in one call based on the function definition. I also cannot pass an array with role names.
https://github.com/microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/Security/Rest/Grant-RsRestItemAccessPolicy.ps1
Is there another way how to set multiple roles I am not aware of?
I am using PowerBI Reporting Server January 2026