ใ‚†ใ‚‹ใƒ†ใƒƒใ‚ฏใƒŽใƒผใƒˆ

Handling SAML Attributes and Mapping

SAML can carry user attributes along with authentication results. Knowing the naming differences and mapping tips makes operations smoother.

๐Ÿ“„ Attribute Basics

Attributes like email, name, and roles can be embedded in the SAML Response for account linking and authorization.

Common attributes

  • โœ… email: Used as login ID or notification address.
  • โœ… givenName / surname: Used for display name.
  • โœ… groups / roles: Used for access control.

๐Ÿงฉ Attribute Mapping

Map IdP-provided attribute names to your internal user fields.

Mapping tips

  • ๐Ÿ” Attribute names and namespaces differ by IdP (AzureAD, Okta, Google Workspace).
  • ๐Ÿ” Agree on required attributes up front; missing values can break login.
  • ๐Ÿ” Verify values in test/staging; they may differ from production tenants.

โš™๏ธ IdP Differences and Setup Tips

Attribute names/namespaces differ by IdP, so align expectations and document them up front.

Attribute Profile

SAML defines Attribute Profiles (e.g., X.500/LDAP) to standardize attribute names/namespaces. Using a standard profile improves interoperability.

  • Refer to standard profiles (e.g., X.500/LDAP Attribute Profile) and align names/namespaces.
  • If using IdP-specific custom attributes, document the SP mapping explicitly.
  • Agree whether the integration follows a standard profile.

IdP specifics

  • ๐Ÿ”ง AzureAD: URL-style EntityID; attributes often have unique namespaces.
  • ๐Ÿ”ง Google Workspace: Uses its own namespace; attribute names may need adjustment.
  • ๐Ÿ”ง Okta/Keycloak: Very flexible but many options; AttributeStatement scope is wide.

SP-side tips

  • ๐Ÿ› ๏ธ Document accepted attribute names and share with the IdP team.
  • ๐Ÿ› ๏ธ Define AttributeConsumingService in metadata when possible.
  • ๐Ÿ› ๏ธ Track tenant/env differences and share them with support teams.