All Products
Search
Document Center

CloudSSO:SetExternalSAMLIdentityProvider

Last Updated:Mar 29, 2024

Configures a Security Assertion Markup Language (SAML) identity provider (IdP).

Operation description

During SAML 2.0-based single sign-on (SSO) logon, CloudSSO is an SP, and the identity management system of an enterprise is an IdP.

You can use one of the following methods to configure a SAML IdP. You can obtain the required metadata file or parameter values from your IdP.

  • Use the metadata file. You can specify the EncodedMetadataDocument parameter to upload the metadata file.
  • Manually configure the IdP. You can manually specify the following parameters for your IdP: EntityId, LoginUrl, WantRequestSigned, and X509Certificate.

If you have configured a SAML IdP, the existing configurations are replaced after you call this operation.

  • If the IdP is configured by using the metadata file, all existing configurations are replaced with new configurations.
  • If the IdP is manually configured, the original parameter values that are different from the new parameter values are replaced.
Note If SSO logon is enabled, new configurations immediately take effect. Take note of the impacts on the production environment.

This topic provides an example on how to configure an IdP by using the metadata file within the directory d-00fc2p61****.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cloudsso:SetExternalSAMLIdentityProviderWrite
  • Directory
    acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DirectoryIdstringYes

The ID of the directory.

d-00fc2p61****
EncodedMetadataDocumentstringNo

The metadata file of the IdP. The value of this parameter is Base64-encoded.

The file is provided by the IdP that supports SAML 2.0.

PD94bWwgdmVyc2lvbj0iMS4****
SSOStatusstringNo

The status of SSO logon. Valid values:

  • Enabled
  • Disabled (default)
Disabled
EntityIdstringNo

The entity ID of the IdP.

http://www.okta.com/exk3qwgtjhetR2Od****
LoginUrlstringNo

The logon URL of the IdP.

https://dev-xxxxxx.okta.com/app/dev-xxxxxx_cloudssodemo_1/exk3qwgtjhetR2Od****/sso/saml
WantRequestSignedbooleanNo

Specifies whether CloudSSO needs to sign SAML requests. The requests are sent when users log on to the CloudSSO user portal to initiate SAML-based SSO. Valid values:

  • true: yes
  • false: no (default)
false
X509CertificatestringNo

The X.509 certificate in the PEM format. If you specify this parameter, all existing certificates are replaced.

MIIC8DCCAdigAwIBAgIQP9eomUYGeoND****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

63160579-2E1B-57B0-8273-B27427172385
SAMLIdentityProviderConfigurationobject

The configurations of the IdP.

EntityIdstring

The entity ID of the IdP.

http://www.okta.com/exk3qwgtjhetR2Od****
SSOStatusstring

The status of SSO logon. Valid values:

  • Enabled
  • Disabled
Disabled
DirectoryIdstring

The ID of the directory.

d-00fc2p61****
EncodedMetadataDocumentstring

The metadata file of the IdP. The value of this parameter is Base64-encoded.

PD94bWwgdmVyc2lvbj0iMS4****
CreateTimestring

The time when the IdP was configured for the first time.

2021-11-10T02:57:16Z
WantRequestSignedboolean

Indicates whether CloudSSO needs to sign SAML requests. The requests are sent when users log on to the CloudSSO user portal to initiate SAML-based SSO. Valid values:

  • true: yes
  • false: no (default)
false
UpdateTimestring

The time when the IdP configurations were last modified.

2021-11-10T02:57:16Z
CertificateIdsarray

The ID of the SAML signing certificate.

string

The ID of the SAML signing certificate.

Multiple IDs are separated by commas (,).

[ "idp-c-00buzdx63z8ewtdf****", "idp-c-00gmuxnr2mrek3t2****" ]
LoginUrlstring

The logon URL of the IdP.

https://dev-xxxxxx.okta.com/app/dev-xxxxxx_cloudssodemo_1/exk3qwgtjhetR2Od****/sso/saml

Examples

Sample success responses

JSONformat

{
  "RequestId": "63160579-2E1B-57B0-8273-B27427172385",
  "SAMLIdentityProviderConfiguration": {
    "EntityId": "http://www.okta.com/exk3qwgtjhetR2Od****",
    "SSOStatus": "Disabled",
    "DirectoryId": "d-00fc2p61****",
    "EncodedMetadataDocument": "PD94bWwgdmVyc2lvbj0iMS4****",
    "CreateTime": "2021-11-10T02:57:16Z",
    "WantRequestSigned": false,
    "UpdateTime": "2021-11-10T02:57:16Z",
    "CertificateIds": [
      "[ \"idp-c-00buzdx63z8ewtdf****\", \"idp-c-00gmuxnr2mrek3t2****\" ]"
    ],
    "LoginUrl": "https://dev-xxxxxx.okta.com/app/dev-xxxxxx_cloudssodemo_1/exk3qwgtjhetR2Od****/sso/saml"
  }
}

Error codes

For a list of error codes, visit the Service error codes.