Issue setting up roles based on group claims

Product: PowerShell Universal
Version: 5.0.6

So I have setup OIDC and am trying to grant new users permissions based on what groups they are in in Azure AD. I put in the claim value and the claim type, then restart the PSU service, but it does not work and gives me this error.


This is what my Roles.ps1 looks like.

For extra fun the Admin role also disappears from the Roles page, presumably due to the error.

Ah - Remove the -Policy script block from any roles that have claims mapping enabled.

@adam I didn’t see anything documented for this - I presume it’s intended behavior as only one should be used at a time, but can you confirm that this isn’t a bug at the least?

Hope this helps!
:wavy_dash:ZG