Skip to content

Update Grant-RsRestItemAccessPolicy.ps1 to allow for setting multiple…#445

Open
Terr4 wants to merge 1 commit intomicrosoft:masterfrom
Terr4:patch-1
Open

Update Grant-RsRestItemAccessPolicy.ps1 to allow for setting multiple…#445
Terr4 wants to merge 1 commit intomicrosoft:masterfrom
Terr4:patch-1

Conversation

@Terr4
Copy link

@Terr4 Terr4 commented Mar 7, 2026

… roles

Update Grant-RsRestItemAccessPolicy.ps1 to allow for setting multiple roles. Passing an array to this function now sets all roles defined in the array for the specified identity. Previously it was only possible to specifiy one role for an identity. Keeping the parameter name "role" for backward compatibility as it also accept just a string with one role name as before the change.

Fixes # .

Changes proposed in this pull request:

  • role parameter can be string or array
  • roles get set regardless if identity is already present

How to test this code:

  • set roles and role for identity that already exist
  • set roles and row for new identity
  • try to set non existing role

Has been tested on (remove any that don't apply):

  • Windows Server 2022
  • SQL Server 2025
  • PBIRS 2025 release January 2026
  • Powershell 7.4 LTS

… roles

Update Grant-RsRestItemAccessPolicy.ps1 to allow for setting multiple roles. Passing an array to this function now sets all roles defined in the array for the specified identoty. Previously it was only possible to specifiy one role for an identity. Keeping the parameter name "role" for backward compatibility as it also accept just a string as before the change.
@Terr4
Copy link
Author

Terr4 commented Mar 7, 2026

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant