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
- See Identity Provider Management for important overview information.
Request Body
{"name"=>"externalId", "value"=>"${providerAttributes.externalId}", "update"=>"ALWAYS"}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/5cf3a911-174a-4d7a-8cc0-2d038a2de164/attributes/668d84f5-b848-4006-bb25-363214960c27"},"identityProvider":{"href":"https://api.pingone.com/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/identityProviders/5cf3a911-174a-4d7a-8cc0-2d038a2de164"}},"name":"externalId","value":"${providerAttributes.externalId}","update":"ALWAYS","id":"668d84f5-b848-4006-bb25-363214960c27","mappingType":"CUSTOM","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"identityProvider":{"id":"5cf3a911-174a-4d7a-8cc0-2d038a2de164"},"createdAt":1559601707798,"updatedAt":1559601707798}