Choose your language:
    Update SSO Settings
    Parameters
    idpSamlMetadataUrl  null, string  Optional

    URL of Identity Provider SAML Metadata endpoint

    defaultRole  role.id  Optional

    The default role assigned to SSO users that do not belong to any SSO group

    Returns
    Returns a sso_settings object.

    Examples

    Example code:
    const SiteClient = require('datocms-client').SiteClient;
    const client = new SiteClient('YOUR-API-TOKEN');
    client.ssoSettings.update({
    idpSamlMetadataUrl: 'https://my-org.oktapreview.com/app/XXXX/sso/saml/metadata',
    defaultRole: '34'
    })
    .then((ssoSettings) => {
    console.log(ssoSettings);
    })
    .catch((error) => {
    console.error(error);
    });
    Returned output:
    > node example.js
    {
    "id": "312",
    "idpSamlMetadataUrl": "https://my-org.oktapreview.com/app/XXXX/sso/saml/metadata",
    "scimBaseUrl": "https://sso.datocms.com/scim",
    "samlAcsUrl": "https://sso.datocms.com/XXX/saml/consume",
    "spSamlMetadataUrl": "https://sso.datocms.com/XXX/saml/metadata",
    "spSamlBaseUrl": "https://sso.datocms.com/XXX/saml",
    "samlToken": "a2a24ae5fbb2d955b1b4fa73f2dd58",
    "scimApiToken": "as3dasjh1234hj1",
    "defaultRole": null
    }