[2026.3.3] $ClaimsPrincipal is a JSON string

[2026.3.3] $ClaimsPrincipal is a JSON string

avatar

PSU 2026.3.3
IIS Hosted
Endpoint/API

$ClaimsPrincipal looks to be a json string instead of the [ClaimPrincipal] class as indicated in the documentation here: Variables | Devolutions PowerShell Universal | Product guides & reference.

Attempting to filter under the assumption that it's the .Net class fails:

$ClaimsPrincipal.Claims | ?{ $_.Issuer -eq 'https://www.poshtools.com' } | ?{ @('MyApproved','GroupsHere') -contains $_.Value })


Instead, I have to convert it from JSON to then be able to filter:

($ClaimsPrincipal | ConvertFrom-Json).Claims | ?{ $_.Issuer -eq 'https://www.poshtools.com' } | ?{ @('MyApproved','GroupsHere') -contains $_.Value }


Is this intentional or a bug? If it's intentional, the documentation should probably be updated.

All Comments (0)