OIDC: a "roles" claim arrives renamed - New-PSURole -ClaimType 'roles' matches nobody (not documented)

OIDC: a "roles" claim arrives renamed - New-PSURole -ClaimType 'roles' matches nobody (not documented)

avatar

Hi support,


a bug about missing documentation of oidc role claims.


Environment: PowerShell Universal 2026.3.4, OpenID Connect sign-in.


Our identity provider sends a "roles" claim. New-PSURole -ClaimType 'roles' -ClaimValue 'X' matched no user. -ClaimType 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role' works, so the claim is renamed by the ASP.NET inbound claim mapping. A "groups" claim keeps its name, so -ClaimType 'groups' works as expected.

Neither the OpenID Connect page nor the New-PSURole documentation mentions this. Please document it, or add a setting to turn off the inbound claim mapping, so that claims keep the names the provider sends.


Thanks

René

All Comments (1)

avatar

Hello René,


Thank you for the clear report. You are right about the cause.


In PowerShell Universal 2026.3.4, the OpenID Connect sign-in keeps the ASP.NET Core default for inbound claim mapping, so a "roles" claim from your provider reaches PowerShell Universal under the long role claim type that you found. A role's claim mapping is compared with the claim type after that renaming, which is why -ClaimType 'roles' matched no one and the long claim type works. The value you use now is the right one for this version, and you can keep it.


There is no dedicated OpenID Connect setting in 2026.3.4 to turn this mapping off, and neither the OpenID Connect page nor the New-PSURole reference mentions it.


I am passing your documentation request to our documentation team and will let you know what comes of it. For the setting that keeps the provider's claim names, please post it in our PowerShell Universal feature request forum so you can follow it there.

https://forum.devolutions.net/forums/213/devolutions-powershell-universal--feature-request


Best regards,


Michel

Michel Audi