Does anyone know of a way to manipulate authorization policies after the dashboard has been started/built. The problem I’m currently having is finding a way to update the built in $AuthorizationPolicy object if I make changes for example, after the dash has been started.
Is there any way to rebuild the policies? or even just manipulate $AuthorizationPolicy.endpoint.scriptblock ?
Example, if i do $AuthorizationPolicy = AuthorizationPolicy | ? {_.name -ne “MyPolicyToRemove”}
nothing changes. Any Ideas?
The reason I’m looking into doing this is because I’ve got a SQL table with my auth policies in, which popuates the dash auth policies when it’s built (currently works fine), I also dynamically lookup and apply these policies from sql when dot sourcing in all my pages. I’m looking to create an admin page so that I can manage who has access to what page etc while the dashboard is still running.