Added identity providers —
Check the API reference
LogoLogo
Other APIsChangelog
  • Welcome to Provisioning API
  • Getting started
    • API specification
    • Authorization
    • Applications
  • API reference
    • API credentials
      • The API credential object
      • Create an API credential
      • List all API credentials
      • Retrieve an API credential
      • Update an API credential
      • Delete an API credential
    • Application memberships
      • The application membership object
      • Create an application membership
      • List all application memberships
      • Retrieve an application membership
      • Update an application membership
      • Delete an application membership
    • Identity providers
      • The identity provider object
      • Create an identity provider
      • List all identity providers
      • Retrieve an identity provider
      • Update an identity provider
      • Delete an identity provider
    • Memberships
      • The membership object
      • Create a membership
      • List all memberships
      • Retrieve a membership
      • Update a membership
      • Delete a membership
    • Organizations
      • The organization object
      • Create an organization
      • List all organizations
      • Retrieve an organization
      • Update an organization
    • Permissions
      • The permission object
      • Create a permission
      • List all permissions
      • Retrieve a permission
      • Update a permission
    • Roles
      • The role object
      • Create a role
      • List all roles
      • Retrieve a role
      • Update a role
    • User
      • The user object
      • Retrieve the user
      • Update the user
    • Versions
      • The version object
      • List all versions
      • Retrieve a version
On this page
  • Setting up SSO
  • Redirect URI
  • Identity provider status
  • Examples
  • Logging in to the Dashboard with SSO
  • Login errors
  1. API reference

Identity providers

The identity provider object and the allowed CRUD operations on the related resource endpoint

PreviousDelete an application membershipNextThe identity provider object

Last updated 1 day ago

Identity providers allow users to authenticate themselves to the Commerce Layer Dashboard using a single set of credentials. Identity providers leverage the open standard and decentralized authentication protocol , built on top of and JWT (JSON Web Token), actually enabling Single Sign-On (SSO) on the Dashboard.

Identity providers can be created, updated, and deleted by users only (the user must be the organization's owner). For non-enterprise users and all the members of enterprise organizations other than the owner identity providers are read-only.

Setting up SSO

To enable SSO for your user you need to create at least one identity provider resource and properly set up the domains in scope. In detail:

  1. — to do that, choose a meaningful name (must be unique across all Commerce Layer users), specify the list of domains you want to put in scope (i.e. that will be used to validate the email address of the user that will try to log in via SSO), and add all the necessary information and parameters supplied by your IdP of choice (Auth0 by Okta, Microsoft Azure, etc. or any custom one — you can find some examples ), such as:

    • Client ID

    • Client secret

    • Issuer

    • Token URL

    • Authorize URL

    • JWKS (JSON Web Key Sets) URL

  2. Add the TXT record you get from the successful response to all the domains specified in the list (you must be the domain owner).

Redirect URI

If the 3rd-party service you've chosen as your IdP requires a redirect_uri to be specified, use the following:

https://auth.commercelayer.io/users/auth/openid/callback

Identity provider status

Identity providers are created in pending status and a verification job on the specified domains is immediately started (domain existence, correct TXT record presence, etc.). On success, the status is automatically moved to verified. Otherwise, it remains pending or is moved to error (e.g. domain non-existent, verification process timed-out, etc.).

You can temporarily disable an identity provider by passing the _disable trigger attribute and eventually re-enable them by passing the _enable trigger attribute.

Since the txt_record attribute you get from the response is encoded based on the IdP keys (client ID, client secret, issuer, etc.), if you change one of them a new TXT record will be generated and the identity provider status moved back to pending until you update the TXT record with the new one on all the domains specified in the list.

Examples

"data": {
  "type": "identity_providers",
  "attributes": {
    "name": "My Auth0 IdP",
    "issuer": "https://dev-ioqs7ks8enwwer5i.us.auth0.com/",
    "client_id": "c6CDk4v1ZV99GrtKcfYVEZRnDDtfy3A0",
    "client_secret": "lRoJB-TrKcjhZBX8l2u0snV_GZebQwk5X9NJvJfzbD_6LL9Tk796N6ng7vxKz_If",
    "token_url": "https://dev-ioqs7ks8enwwer5i.us.auth0.com/oauth/token",
    "authorize_url": "https://dev-ioqs7ks8enwwer5i.us.auth0.com/authorize",
    "jwks_url": "https://dev-ioqs7ks8enwwer5i.us.auth0.com/.well-known/jwks.json",
    "authorize_params": {
      "organization": "org_oXGVhZkDKyi2GcLw"
    }
  }
}
"data": {
  "type": "identity_providers",
  "attributes": {
    "name": "My Entra IdP",
    "issuer": "https://login.microsoftonline.com/b55c22d0-835b-48d3-a9ac-c3513ad2476f/v2.0",
    "client_id": "9e27b34e-2289-4acc-928d-d97adf8eaabb",
    "client_secret": "A0B8Q~eM2QwggZBqnSvkgiV7sxIPB1cMDiRbCbzH",
    "token_url": "https://login.microsoftonline.com/b55c22d0-835b-48d3-a9ac-c3513ad2476f/oauth2/v2.0/token",
    "authorize_url": "https://login.microsoftonline.com/b55c22d0-835b-48d3-a9ac-c3513ad2476f/oauth2/v2.0/authorize",
    "jwks_url": "https://login.microsoftonline.com/b55c22d0-835b-48d3-a9ac-c3513ad2476f/discovery/v2.0/keys"
  }
}
"data": {
  "type": "identity_providers",
  "attributes": {
    "name": "My Miniorange IdP",
    "issuer": "https://mybrand.xecurify.com/moas/discovery/v2.0/r0SkYtcRAqWC02I",
    "client_id": "r0SkYtcRAqWC02I",
    "client_secret": "4chkmsjKYesUjowUFm1ZcLtuLgI",
    "token_url": "https://mybrand.xecurify.com/moas/rest/oauth/token",
    "authorize_url": "https://mytestbrand.xecurify.com/moas/idp/openidsso",
    "jwks_url": "https://mybrand.xecurify.com/moas/discovery/v2.0/r0SkYtcRAqWC02I/.well-known/jwks"
  }
}

Logging in to the Dashboard with SSO

  1. Click on the Log in with SSO button.

  2. Enter the name of one of the identity providers you created for your user.

  3. Click on the Log in button and enter your credentials.

Login errors

When authenticating in with SSO to the Dashboard you may receive some 302 Found errors, mostly due to possible identity provider misconfigurations. Follow the suggestion displayed in the error message to fix them and try to log in again:

  • Disabled — The selected provider has been disabled, please contact the organization owner.

  • Non-existent — The selected provider does not exist.

  • Not verified — The selected provider is not verified. Please add the provided DNS TXT record to your domain.

  • In error — The selected provider is in error. The domain may not exist or we may be unable to resolve it.

Please find below some examples of how the required parameters must be set when using some of the most common 3rd-party services:

An example of how to set the required parameters when using by Okta (replace your values):

An example of how to set the required parameters when using (replace your values):

An example of how to set the required parameters when using (replace your values):

Once you have successfully set up and verified one or more identity providers, you can use them to with SSO. To do that:

creating an identity provider
Auth0
Microsoft Azure
Miniorange
log in to Dashboard
OpenID connect
OAuth 2.0
Enterprise
Create an identity provider
here