I am trying to assign Users to folder created in orchestrator using the powershell command. But somehow it does assign user to folder. Surprisingly there’s no error as well when command is executed if
roleId both are passed as parameter.
I am using UiPath.Powershell module version : 220.127.116.11
$authToken = Get-UiPathAuthToken -URL $orchestratorURL -Password $orchPassword -Username $orchuserName -TenantName $tenantName $folder = Get-UiPathFolder -DisplayName 'test' -AuthToken $authToken $user = Get-UiPathUser -UserName 'testName' -AuthToken $authToken $role = Get-UiPathRole -Name 'Read Only' -AuthToken $authToken Add-UiPathFolderUserRoles -Id $folder.Id -UserIds $user.Id -RoleIds $role.Id -AuthToken $authToken
But if I dont pass
roleId which is Optional parameter, then i get below mentioned error.
Please let me know how to “Assign access of folder to specific user” using powershell script.