Not sure what’s going on here. I’ve created an app which uses Invoke-PSUScript. Everything works fine when using the built-in administrator role. But if I try to create a custom role and use that to limit access, I get the following error:
Cannot retrieve the dynamic parameters for the cmdlet. Status(StatusCode=“unknown”, Detail=“Bad gRPC response. HTTP status code: 500”)
I’ve tried:
Invoke-PSUScript -name ‘Myfolder/My_script.ps1’ -TrustCertificate
Invoke-PSUScript -name ‘My_script.ps1’ -TrustCertificate
Invoke-PSUScript -script ‘Myfolder/My_script.ps1’ -TrustCertificate
Invoke-PSUScript -script ‘My_script.ps1’ -TrustCertificate
The custom role has all permissions for testing purposes:
MyCustomRole automation.scripts.MyFolder\My_Script.ps1 All
MyCustomRole automation All
MyCustomRole apps All
MyCustomRole apis All
MyCustomRole portal All
MyCustomRole platform All
MyCustomRole home All
MyCustomRole support All
MyCustomRole settings All
MyCustomRole security All
I’ve tried granting this custom role to:
Scripts
Apps,
Variables(secrets)
I’ve tried testing with both a local account and my test SSO/Entra account.
In the same app I’ve also got Get-PSUJob and this works great no matter which role is assigned.