This works as expected. However I’ve noticed that the first time visiting my site for example, after an app pool recycle (scheduled nightly at 2am), I always see the following error on my card:
get-udauthorizationpolicy: internal variables for this cmdlet are not available. Ensure that you are running this within an endpoint
If I then refresh the page, it loads as normal, and the error does not reoccur until the next time the site recycles. Is this a bug? has anyone else seen similar or been able to replicate this?
Weirdly I cant seem to replicate this issue myself, e.g if I manually recycle the app pool then revisit the page. I only tend to notice it in the mornings and assume its to do with the nightly app pool recycle.
I’ve got pass through windows auth enabled and this happens when I visit the site first thing however I do wonder if maybe it could be browser/cache related so I’ll test this tomorrow morning and clear my cache before I try.
You might also want to try the last nightly build. There was an issue with Windows Auth, IIS and auth policies where the $Session scope would not be initialized until after running the auth policies. A second refresh would ensure that the session scope was initialized.
In 2.9.0 i still get this error. Was the fix from the nightly build you mentioned part of 2.9.0?
After the second refresh, it is working as expteced.
[Warn] PowerShellExecutionService Error executing endpoint NavigationMenu. Get-UDAuthorizationPolicy: Internal variables for this cmdlet are not available. Ensure that you are running this within an Endpoint.