You can call this operation to upload the metadata of Security Assertion Markup Language (SAML) 2.0-based identity providers (IdPs).


This operation is supported only on Active Directory (AD) directories, not on RAM directories.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetIdpMetadata

The operation that you want to perform. Set the value to SetIdpMetadata.

DirectoryId String Yes cn-hangzhou+dir-h95efs1mbukd9****

The ID of the AD directory.

IdpMetadata String Yes <EntityDescriptor ID********Descriptor>

The metadata of the IdP.

RegionId String Yes cn-hangzhou

The region ID of the AD directory.

Response parameters

Parameter Type Example Description
IdpEntityId String http://test****.cn/adfs/services/trust

The entityID value obtained after the IdP metadata file is parsed.

RequestId String F369A091-002F-49C8-AD55-02A776297C7B

The ID of the request.


Sample requests
&IdpMetadata=<EntityDescriptor ID********Descriptor>
&<Common request parameters>

Sample success responses

XML format


JSON format

	"RequestId": "F369A091-002F-49C8-AD55-02A776297C7B",
	"IdpEntityId": "http://test****.cn/adfs/services/trust"

Error codes

For a list of error codes, visit the API Error Center.