I have an app and a script. The script runs with different credentials. “Administrator” and an “App-User”-Group have permissions on all three parts (app, script, secret).
When I run the script within the app as admin, it works.
When a user from the “app-group” runs the script from the portal, it works. When he starts the script in the app, it fails. Error message:
“An error occurred: Cannot retrieve the dynamic parameters for the cmdlet. Permission denied. The role specified does not have access to this resource.”
The code is just:
Invoke-PSUScript -Name “Folder\Script.ps1”
Okay, the portal seems to work for the user because in the script settings the role is added under “portal”.
So I’ve created a tag with this role and added the tag to the script. I have found some topics that stated this, but unfortunately it is still not working (restarted the app and even the service itself).