Skip to content

Refresh SAML provider metadata.

POST
/api/admin/saml-providers/{id}/refresh-metadata
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/saml-providers/example/refresh-metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "metadataUrl": "https://idp.example.com/metadata.xml" }'

Fetches metadata from the configured or supplied HTTPS metadata URL and updates the provider configuration, certificate validation state, and metadata refresh status. The metadata-refresh permission is sufficient only when the configured URL and entityID remain unchanged. Supplying a different URL or approving an entityID change also requires the provider-update permission.

id
required
string

SAML provider id.

Media type application/json
object
metadataUrl
string format: uri
allowEntityIdChange

Explicitly approve an entityID change during this manual refresh. An actual entityID change also requires the provider-update permission.

boolean
Example
{
"metadataUrl": "https://idp.example.com/metadata.xml"
}

Successful JSON response.

Media type application/json
object
success
required
boolean
changed
required
boolean
expired
boolean
config
required
object
entityId
string
ssoUrl
string format: uri
acsUrl
string format: uri
certificate
string
metadataUrl
string format: uri
metadataXml
string
<= 1048576 characters
metadataRefreshPolicy
object
mode
required

URL-backed providers default to automatic when this property is omitted.

string
Allowed values: automatic manual
intervalSeconds
required
integer
default: 21600 >= 900 <= 604800
nextRefreshAt
integer format: int64
lastAttemptAt
integer format: int64
lastSuccessAt
integer format: int64
consecutiveFailures
integer
sourceState
string
Allowed values: healthy stale error expired missing identity_change_pending
lastErrorCode
string
suspendedByMetadataSync

True when metadata lifecycle automation disabled the provider.

boolean
key
additional properties
nameIdFormat
string
metadataNameIdFormats
Array<string>
identityMapping
object
fieldMappingSetId
required
string
fieldMappingVersionId
string
destinationNamespace
string
destinationFieldPolicies

Per-SP release mode for every attribute in the active SAML Destination Profile.

object
key
additional properties
string
Allowed values: required optional hidden
key
additional properties
attributeReleaseConsent
object
enabled
boolean
mode
string
Allowed values: once every_time until_attributes_change
key
additional properties
key
additional properties
enabled
required
boolean
metadataRefreshStatus
required
object
key
additional properties
Example
{
"success": true,
"changed": true,
"config": {
"entityId": "https://idp.example.com/metadata"
},
"enabled": true,
"metadataRefreshStatus": {
"diff": {
"changed": true
}
}
}