You can call this operation to query the metadata of Security Assertion Markup Language (SAML) 2.0-based service providers (SPs).

Description

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

Debugging

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 GetSpMetadata

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

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

The ID of the AD directory.

RegionId String Yes cn-hangzhou

The region ID of the AD directory.

Response parameters

Parameter Type Example Description
RequestId String D3506372-0840-466F-9E73-98D58432D6A7

The ID of the request.

SpMetadata String <?xml version=************/md:EntityDescriptor>xml version=************/md:EntityDescriptor>

The metadata of the SP.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=GetSpMetadata
&DirectoryId=cn-hangzhou+dir-h95efs1mbukd9****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<GetSpMetadataResponse>
      <SpMetadata>&lt;?xml version=************/md:EntityDescriptor&gt;</SpMetadata>
      <RequestId>D3506372-0840-466F-9E73-98D58432D6A7</RequestId>
</GetSpMetadataResponse>

JSON format

{
    "SpMetadata": "<?xml version=************/md:EntityDescriptor>",
    "RequestId": "D3506372-0840-466F-9E73-98D58432D6A7"
}

Error codes

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