Create Identity Provider Attribute (SAML)

POST {{apiPath}}/environments/{{envID}}/identityProviders/{{providerID}}/attributes

The POST /environments/{{envID}}/identityProviders/{{providerID}}/attributes operation adds a SAML identity provider attribute resource for the specified identity provider. Any placeholder is acceptable.

If SAML is specified as the the external identity provider, any SAML attribute defined in the assertion can be used as the mapping attribute placeholder value.

The placeholder value must use the following syntax:

${providerAttributes.<SAML attribute name>}

When you create a new SAML identity provider entity, the POST request automatically maps the PingOne username attribute to the SAML samlAssertion.subject attribute. The username attribute is the core mapping attribute; the default SAML attribute value is ${samlAssertion.subject}, which is a special reserved placeholder to refer to the subject name ID in the SAML assertion response.

SAML attributes can be mapped to any searchable PingOne user attribute, such as username, name.family, name.given, email, phone, externalId, or population.id.

The following sample shows the request body to map the PingOne externalId attribute to an externalId attribute defined in the SAML assertion.

{
    "name": "externalId",
    "value": "${providerAttributes.samlAssertion.externalId}",
    "update": "EMPTY_ONLY"
}

See Identity Provider Attributes for more information. See also Base IdP data model for the properties available to all of the supported identity providers.

Prerequisites

Request Body

{"name"=>"externalId", "value"=>"${providerAttributes.externalId}", "update"=>"ALWAYS"}

RESPONSES

status: Created

{&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/5cf3a911-174a-4d7a-8cc0-2d038a2de164/attributes/668d84f5-b848-4006-bb25-363214960c27&quot;},&quot;identityProvider&quot;:{&quot;href&quot;:&quot;https://api.pingone.com/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/5cf3a911-174a-4d7a-8cc0-2d038a2de164&quot;}},&quot;name&quot;:&quot;externalId&quot;,&quot;value&quot;:&quot;${providerAttributes.externalId}&quot;,&quot;update&quot;:&quot;ALWAYS&quot;,&quot;id&quot;:&quot;668d84f5-b848-4006-bb25-363214960c27&quot;,&quot;mappingType&quot;:&quot;CUSTOM&quot;,&quot;environment&quot;:{&quot;id&quot;:&quot;abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6&quot;},&quot;identityProvider&quot;:{&quot;id&quot;:&quot;5cf3a911-174a-4d7a-8cc0-2d038a2de164&quot;},&quot;createdAt&quot;:1559601707798,&quot;updatedAt&quot;:1559601707798}