I’m upgrading from v4 to v5 and testing existing working scripts from v4.
I use Get-PSUDashboard to get dashboards to build a dynamic multi-tier navigation menu.
This works fine in v5 when I am using my Administrator role account, but fails for all other users.
Issue seems to be around Get-PSUDashboard command and I’m guessing it’s some permission issue, given that admin account works and others don’t. Obviously, I can’t give everyone Administrator role to work around it.
I’ve tried playing around with -AppToken and -Credential parameters, but not getting very far.
Any ideas or workarounds?
I’ve worked around it by changing the security model to permissive. I couldn’t get -AppToken [string] to work - so maybe I’m not fully understanding AppToken permissions when I create them.
Module | PowerShell Universal
I’m getting the same issue on one of my dashboards, though I’m already on ‘Permissive’ security model.
My codebase hasnt changed for my app and this works fine in V4.
Works fine for PSU Admins but not for other users on the dashboards, it’s throwing:
Status(StatusCode="Cancelled", Detail="Bad gRPC response. Invalid content-type value: text/html; charset=utf-8")
I then dipped into the page code and added -Integrated
to all my PSU commands in my dashboard so Get-PSUScript
& Get-PSUJob
as an example.
After reloading the page, it worked, no more gRPC errors, not sure if these commands should behave by default in that way or if it’s expected that i should be adding -integrated, though if thats the case I’m not sure why there should be a difference between v4 and v5 on this.
It would be good to understand why there’s a difference between an admin with full access to everything and a regular user.
I’m also not sure why but ever since upgrading to V5 I’m getting slow page load times and hanging at the start before the rest of the page loads, i just get a few horizontal grey bars at the top for a while.
Edit: I’m on a nightly build 5.6.0 (15547654537)
Edit2: after further testing -Integrated is only required on Get-PSUScript and not Get-PSUJob (Get-PSUScript is piped into Get-PSUJob). Since there is a difference here I’ll raise it as an issue on github incase this is not expected behaviour.
Edit3: Adam mentioned on another issue that I can switch the security model to ‘Integrated’ (I previously had permissive), and this will by default bypass security to mimic the behavior of v4