opyeb samlview

samlview · Identity

NameID formats and AttributeStatements

NameID Format, persistent and transient, emailAddress, Attribute NameFormat, multi-value

What breaks more often than login success is 'who was I logged in as'. In SAML the Subject/NameID is the user identifier and AttributeStatement holds the user's attributes. Both have format and naming rules, so the values alone can mislead.

NameID formats

FormatMeaningCaveat
persistentan opaque identifier fixed per SPcannot compare users; the value may change on reissue
transientan identifier that changes per sessionunusable after logout; poor for account mapping
emailAddressthe e-mail addresscan change or repeat; exposes personal data
unspecifiedthe IdP's default formatthe real format must be checked separately
entityan entity identifierused between services

Many IdPs use persistent to prevent correlation between SPs, so the same user can have a different NameID at each SP. Keep that in mind when comparing values in logs.

The three names of an attribute

An SP usually finds attributes through a mapping configuration rather than the Name alone. The same Name with a different NameFormat can fail to map.

Multi-valued attributes

One Attribute can carry several AttributeValue elements; group and role lists are typical. If the SP only reads the first value, the second looks as if it vanished. Compare the count and order of values.

Common attribute names

PurposeCommon Name
e-mailurn:oid:0.9.2342.19200300.100.1.3 / emailaddress
nameurn:oid:2.5.4.42 (givenName), 2.5.4.4 (sn)
departmenturn:oid:2.16.840.1.113719.1.1.4.1.25
grouphttp://schemas.xmlsoap.org/claims/Group
rolehttp://schemas.microsoft.com/ws/2008/06/identity/claims/role

samlview lists every AttributeStatement attribute with name, NameFormat, FriendlyName and values, one line per value. Sensitive values can be masked in the XML view before sharing.

Frequently asked questions

The NameID changes every time. Is that a bug?

With the transient format it is normal: a new value is issued per session. Account mapping uses persistent or emailAddress instead.

An attribute is missing. Why?

The IdP's release policy may not send it to this SP. Check whether the AttributeStatement is empty or whether only the name differs.

How do I share without personal data?

Turn on masking in the XML view; NameID, attribute values and SessionIndex are hidden while structure and names remain, which is enough for analysis.

Load the multi-attribute sample and see how the values are laid out.

Open the tool

This article follows OASIS SAML 2.0 Core (2005), SAML 2.0 Bindings, SAML 2.0 Profiles, XML Signature 1.1 and RFC 1951 (DEFLATE). Every example is synthetic data.