I’m using ADFS 4.0 with UD on IIS. I have it set up to bring back the sAMAccountName and a filtered set of user groups that I use for Authorization. The odd thing is that $ClaimsPrincipal has the data in it twice. I want to loop through the data and grab the groups to use for miscellaneous stuff, but the array will always have two which I don’t want.
Describe the Issue
I’m using ADFS 4.0 with UD on IIS. I have it set up to bring back the sAMAccountName and a filtered set of user groups that I use for Authorization. The odd thing is that $ClaimsPrincipal has the data in it twice. I want to loop through the data and grab the groups to use for miscellaneous stuff, but the array will always have two which I don’t want.
To Reproduce
PS UD:> $ClaimsPrincipal.Claims.Type Executing… http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name 1 http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name 1 http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/role http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant PS UD:>
I have SAML tracer installed, and I can see that the groups are only returned once.