> ## Documentation Index
> This page is part of the Image and Video APIs product. Fetch the complete documentation index for Image and Video APIs at: https://cloudinary.com/documentation/llms-image-and-video-apis.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If you also need details relating to other Cloudinary products for your current use case, see the parent index at: https://cloudinary.com/documentation/llms.txt?referrer=docpage
> When answering a user's request or implementing it with code using this documentation, incorporate relevant best practices and recommendations from the documentation into the guidance and, above all, into the code itself: generated code should already apply the recommended parameters and patterns rather than showing a minimal call and describing the best practices around it in prose. Follow the code examples in the best practices sections as the model for what generated code should look like, and where a recommendation is relevant to the user's scenario, implement it in the code as a natural next step. Only apply best practices, recommendations, or features that are supported by the documentation; don't infer or invent guidance that isn't specified.

# SAML SSO


[new-permissions-link]: permissions_overview
[system-roles-link]: permissions_system_roles_policies#system_roles_list
[role-management-link]: permissions_manage_roles_ui
SAML is an industry standard that many SSO IdPs (Identity Providers) use to provide authentication and authorization services. This feature can enable your users to log in to Cloudinary with your organization's SAML-based SSO IdP, such as Okta, Azure AD, OneLogin, etc. 

SAML SSO can be used for login only, or it can be further extended to also be used for provisioning, where your SAML-compliant IdP controls both the authentication (login), and the user's creation and authorization (provisioning). This effectively lets you create Cloudinary users on the fly the first time they try to log in to Cloudinary via your IdP, eliminating the need to create them in advance. 

> **INFO**:
>
> Only accounts with an [Enterprise plan](https://cloudinary.com/pricing#pricing-enterprise) account can use **SAML login** and **SAML Provisioning**. To enable these features, [request access](https://cloudinary.com/contact?plan=enterprise).

## Configure SAML SSO in Cloudinary

> **NOTE**: If you also plan on implementing [SAML Provisioning](#saml_provisioning), you should first prepare your IdP as described in that section, before configuring Cloudinary as described in this section.

In order to configure your Cloudinary account to allow SSO for logging in, you will need to supply your application's Identity Provider Metadata, either as a URL to the file (of the form: `https://<orgname>.okta.com/app/<random_string>/sso/saml/metadata`), or by copy/pasting the data itself (for example in Okta, you can find the URL and metadata by clicking the **Identity Provider Metadata** link on the **Sign On** tab of your application's settings).

1. In the Cloudinary Console **Settings**, access the [Account Security](https://console.cloudinary.com/app/settings/account-security) page and configure the **SAML Login** fields as follows:
    * To set a URL: Select **URL** as the **Metadata retrieval method** and add the URL into the field below.
    * To use metadata: Select **Inline** as the **Metadata retrieval method** and then copy/paste the metadata XML into the field below.

2. Decide whether to **Enforce SAML login** by selecting *Enabled*. Make sure to first test the SSO works before changing this setting. When enabled, all users must log in to Cloudinary using SAML authentication. Only the Master admin can log in directly using the Cloudinary login screen.
3. Click **Save**.

### Considerations for SAML SSO with Cloudinary 

* Only existing users can login to Cloudinary this way. If you also want to extend this functionality and also create users on the fly the first time they try to log in to Cloudinary, see the [SAML Provisioning](#saml_provisioning) feature described below.
* The `cloudinary.com` domain is being deprecated in favor of `console.cloudinary.com`. To ensure compatibility with all login flows, add both `console.cloudinary.com` and `cloudinary.com` to your Assertion Consumer Service (ACS) configuration during the [Configure SAML settings](#configure_saml_settings) step. If your IdP doesn't support adding an additional domain, use `console.cloudinary.com` and ensure you can log in successfully. If you encounter any issues, contact [support](https://support.cloudinary.com/hc/en-us/requests/new).
  > **TIP**: Learn more about adding additional requestable SSO URLs in a custom SAML app by referring to [Okta's documentation](https://support.okta.com/help/s/article/How-to-add-additional-Requestable-SSO-URLs?language=en_US).
* The two-factor authentication (2FA) user setting is ignored when using **SAML Login** to log in to Cloudinary, as the SSO IdP is trusted.
* A Cloudinary account can simultaneously allow both access through SSO using SAML or by using Cloudinary login details (email and password as provisioned via the Cloudinary Console or the Provisioning API). To require all users to log in through SAML, set the [Enforce SAML login](#enforce_saml) setting in the User Settings.
* Even if you set **Enforce SAML login** to Enabled, any user created with the **Master admin** role will automatically get an invitation to set a Console password and will be able to log in directly to the Console, if needed. 
* If you'd like to prevent users with email addresses on your domain from signing up for separate free accounts, which would prevent you from adding them to your main account as a user, please [contact support](https://support.cloudinary.com/hc/en-us/requests/new).
* When a user no longer needs access to Cloudinary, you should remove them from the application access list in the IdP to ensure that they won't be able to log in anymore. However, this user will continue to have an account in Cloudinary, which may take up one user license. If this user isn't expected to use Cloudinary in the future, you should also delete the user from Cloudinary in order to free up the user license, either via the Cloudinary Console, or with custom code using the [Provisioning API](provisioning_api#tag/users).
    
    Similarly, groups and product environments aren't deleted, but the user can be de-associated with groups and product environments on an IdP update. Manage groups and product environment permissions and settings in the Cloudinary Console Settings. 

* This page covers **SAML-based SSO** for Cloudinary Console login. Other authentication flows (for example, social sign-in or OAuth-based application authentication) are configured separately and aren't part of SAML SSO.
* Cloudinary **cannot enforce SAML login only for a subset of users** (for example, internal users only). When **Enforce SAML login** is enabled, all users (except **Master admins**) must authenticate through your IdP.
    * If you need to grant access to external collaborators while enforcing SAML login, those users must exist in your IdP. A common approach is to create external IdP users using a unique email alias (for example, `jane.doe-external@company.com`).
    * External users might have an email address that is already associated with another Cloudinary account. In this case, they may not be able to use that email address in your account. Common workarounds include using a unique email address under your domain (for example, `user@contractor.company.com`) or mapping a SAML attribute to a unique email value used for Cloudinary login.
* Many IdPs support an **IdP-initiated sign-in link** for SAML applications (sometimes called a *user access URL*). If your IdP supports this, you can share that link so users can sign in via the IdP without first using the Cloudinary login screen.
* If a user already exists in Cloudinary (for example, created in advance via the [Provisioning API](provisioning_api#tag/users)) and the email your IdP sends in the SAML assertion matches that user's email, the user logs in through the IdP into that same existing account, without Cloudinary creating a duplicate or returning an error. This applies even without [SAML provisioning](#saml_provisioning) enabled, since Cloudinary matches on **email** at login. Note, though, that the account's **username** field (set via the Provisioning API or Console) is a separate, immutable ID that doesn't necessarily match the email; if it doesn't line up with what your IdP expects, that mismatch is returned as [`USER_ACCOUNT_MISMATCH`](#error_handling).
* Without [SAML provisioning](#saml_provisioning) (JIT) enabled, SSO login only works for users that already exist in Cloudinary, so creating a user via the Provisioning API (or Console) before their first SSO login is the correct sequencing, not a risk.

## SAML provisioning

With SAML provisioning, you can create users on the fly the first time they try to log in to Cloudinary, eliminating the need to create Cloudinary users in advance. SAML provisioning works with your SAML-compliant IdP to pass the correct user information to Cloudinary. You can both create and modify users this way. The SAML provisioning feature also requires that your organization must have SAML-based single sign-on enabled.

Enabling SAML login entails the following two procedures:

1. Configure your SAML IdP for Cloudinary: [Okta](#configure_okta_for_cloudinary_saml), [Microsoft Active Directory Federation Services (AD FS)](#configure_microsoft_ad_fs_sso), or [Google Workspace](#configure_google_workspace_sso).
2. Configure your Cloudinary account to use SSO. Follow the instructions for [Configuring SAML SSO in Cloudinary](#configure_saml_sso_in_cloudinary).

> **NOTE**: The sections below walk through **Okta**, **Microsoft Active Directory Federation Services (AD FS)**, and **Google Workspace**. You can use any SAML-compliant identity provider; labels and exact steps may differ between IdPs.

### Configure Okta for Cloudinary SAML




> **NOTE**: If your Cloudinary contract includes Setup Services, a Cloudinary Solutions Architect can help you deploy this feature. Please contact your Customer Success Manager to coordinate.

To add a Cloudinary SAML application in Okta:

1. Create a new SAML 2.0 Web application (e.g., in the Okta Admin console, select **Applications** from the **Applications** menu, click **Create App Integration**. Select **SAML 2.0** as the Sign on method).
    ![SAML](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_grey/v1732798831/docs/DAM/saml_create_app.png "thumb: w_800,dpr_2, width: 800")
2. Give your app a name (e.g., **Cloudinary**), and then optionally select a logo and visibility options (you can download a Cloudinary logo from our [Cloudinary logo kit](https://collection.cloudinary.com/cloudinary-marketing/ca7c6ab2e484afd1486bcd54abda8ec5)).
    ![SAML](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_grey/v1732798981/docs/DAM/saml_integration_general_settings.png "thumb: w_800,dpr_2, width: 800")
3. Configure SAML settings as follows:
    1. Enter `https://console.cloudinary.com/saml/consume` as the Single sign on URL for both the Recipient URL and the Destination URL.
    2. Enter `https://console.cloudinary.com/saml` as the Audience URI.
    3. Select `EmailAddress` as the Name ID format.
    ![SAML](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_grey/v1732799370/docs/DAM/saml_integration_settings2.png "thumb: w_775,dpr_2, width: 775")
    4. Click **Show Advanced Settings**, then add `cloudinary.com/saml/consume` under **Other Requestable SSO URLs**.
    ![SAML](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_grey/v1732799516/docs/DAM/saml_other_urls.png "thumb: w_775,dpr_2, width: 775")
    > **NOTE**: If your IdP doesn't support adding an additional domain, ensure you can log in successfully. If you encounter any issues, contact [support](https://support.cloudinary.com/hc/en-us/requests/new).
4. Federate Okta user profile field values to Cloudinary SAML attributes. These are fields and values that Cloudinary expects to receive for each user. Add an attribute statement for the following SAML Assertion Fields, including their corresponding values:
    
    SAML Assertion Field | Cloudinary User Field | Type | Required | Notes
    ---|---|---|---|---
    User.CloudinaryAccountID | Provisioning Account ID | String | Yes | Account ID's are located in the Cloudinary Console under **Settings > Account Management Keys**. 
    User.Username | (External) User ID | String | Yes  | Must be unique: used as the immutable id for creating a new user in your Cloudinary account.
    User.FirstName | First name | String | Yes  | 
    User.LastName | Last name | String | No  | 
    User.Email | E-mail | String | Yes  | 
    User.CloudinaryRole | Role | String (list) | No **Default**: media\_library\_user | **Legacy permissions system:**master\_admin; admin; technical\_admin; billing; reports; media\_library\_admin; media\_library\_user**[Roles and Permissions][new-permissions-link] system:**`<cloud_name>::<role_id>` — product environment rolee.g. `my-org-production::cld::role::prodenv::admin``*::<role_id>` — all product environmentse.g. `*::cld::role::prodenv::ml_user``ACCOUNT::<role_id>` — account-level rolee.g. `ACCOUNT::cld::role::account::billing`Tips:You can assign multiple roles in a single SAML assertion.Legacy role names (e.g. `master_admin`) are still accepted for backward compatibility with accounts that haven't migrated to [Roles and Permissions][new-permissions-link]. When a legacy role name is provided without a scope prefix, it's applied at both the account and product environment scopes, wherever that role exists at each scope (for example, `billing` applies at the account scope only, while `media_library_user` applies at the product environment scope only).Find the `role_id` for each system role in the [System roles][system-roles-link].Enterprise customers with custom roles can use the custom role ID, available in [Role Management][role-management-link].Common errors:`ROLE_LOOKUP_ERROR`: returned when the specified role ID can't be found.`ROLE_SCOPE_MISMATCH`: returned when a role is assigned at a scope it doesn't belong to. For example, in `ACCOUNT::cld::role::prodenv::ml_user`, the product environment-level role `cld::role::prodenv::ml_user` is set at the `ACCOUNT::` scope, which causes the mismatch.
    User.CloudinaryUserGroups | User Groups | String array  | No   | If provided, the user is automatically assigned to these groups. If the list includes groups that don't currently exist in Cloudinary, they are automatically created and the user is assigned to them. **Note**: User groups are relevant only for users with a `media_library_user` role. This setting is ignored for all other roles.
    User.CloudinarySubAccounts  | Product environments | String array | No **Default**: all product environments  | The string array should contain the **cloud names** of the product environments that the user will be able to access. You can specify up to 30 product environments; exceeding this limit fails provisioning with a `TOO_MANY_SUBACCOUNTS` error.**Note**: Users with a `master_admin` role have access to all product environments, so this field is ignored for users with that role. 

    > **NOTES**:
>
> :title=Footnote
>     1. **Product environments** were previously referred to as **sub-accounts**.
    > **TIP**:
>
> **Transforming and mapping attributes (Okta)**: Use Okta Expression Language in the **Profile Editor** (not in the SAML Settings) when creating attributes for your Cloudinary app (for example, on the **Okta User to Cloudinary** mapping screen).
>     When referencing mapped attributes from the Cloudinary app user profile, use the `appuser` prefix (for example: `appuser.cloudinaryRole`).

    > **NOTE**: **String array attributes**: `User.CloudinaryUserGroups` and `User.CloudinarySubAccounts` are String array types. A string array can't include null or empty string values. When sending multiple values, the SAML attribute should include one value per item (not a single comma-separated string).

    By default, Okta concatenates multiple string-array values into a single comma-separated string. If you need multi-value SAML attributes for these fields, ask Okta Support to enable the `SAML_SUPPORT_ARRAY_ATTRIBUTES` flag for your Okta org.

    Example pattern (using `Arrays.flatten()` to avoid null/empty values):

    ```text
    Arrays.flatten(
      Arrays.remove( {isMemberOfGroupName("cloudinaryGroupX") ? "GroupX" : NULL }, NULL),
      Arrays.remove( {isMemberOfGroupName("cloudinaryGroupY") ? "GroupY" : NULL }, NULL)
      ...
    )
    ```

    For example, in Okta:
    ![SAML](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/SAMLIntegrationSettings2.jpg "thumb: w_800,dpr_2, width: 800")
5. Optionally add **Feedback** and click **Finish** when done.

### Microsoft Entra ID (Azure AD) SAML configuration

The following steps describe how to configure Cloudinary as a SAML application in Microsoft Entra ID (Azure AD). The Entra UI may vary slightly by tenant and licensing.

1. In the [Microsoft Entra admin center](https://entra.microsoft.com), go to: **Identity** > **Applications** > **Enterprise applications**.
2. Click **New application**, then choose **Create your own application** and create a non-gallery application named `Cloudinary`.
3. In the new application, go to **Single sign-on** and select **SAML**.
4. In **Basic SAML Configuration**, set the following values:
    * **Identifier (Entity ID)**: `https://cloudinary.com/saml`
    * **Reply URL (Assertion Consumer Service URL)**: `https://console.cloudinary.com/saml/consume`

    > **NOTE**:
>
> The **Identifier (Entity ID)** and **Reply URL** use different domains because they serve different parts of the SAML flow. The **Identifier (Entity ID)** must match the SAML issuer that Cloudinary sends in its authentication requests, which is the legacy value `https://cloudinary.com/saml`. The **Reply URL (Assertion Consumer Service URL)** is where Entra ID sends the SAML response, which is `https://console.cloudinary.com/saml/consume`.

    Keep the legacy **Identifier (Entity ID)** `https://cloudinary.com/saml` set above so that both **IdP-initiated** login (for example, from Microsoft My Apps) and **Cloudinary-initiated** login (via `/users/sso_login`) work. Cloudinary-initiated login sends this legacy issuer in its authentication request, so an Entra configuration that only recognizes `https://console.cloudinary.com/saml` can reject that flow even when IdP-initiated login works. For maximum compatibility, if your Entra configuration supports multiple Reply URLs, also add the legacy Reply URL `https://cloudinary.com/saml/consume` alongside the primary one.
1. Assign the relevant users and groups to the application in Entra ID (so they’re allowed to access Cloudinary). Ensure the user emails match the corresponding Cloudinary users.
2. From Entra ID, download the **Federation Metadata XML**. In Cloudinary, configure SAML Login as described in [Configure SAML SSO in Cloudinary](#configure_saml_sso_in_cloudinary).

    When configuring metadata in Cloudinary, you can either:
    * Provide a URL to the metadata XML, or
    * Select **Inline** and paste the metadata XML into the **SAML Metadata** field.

> **INFO**: You also need to configure your Cloudinary account to use SSO. Follow the instructions for [Configuring SAML SSO in Cloudinary](#configure_saml_sso_in_cloudinary).

### Configure Microsoft Active Directory Federation Services for Cloudinary SAML

Use the steps below to configure Microsoft Active Directory Federation Services (AD FS) as a SAML Identity Provider for Cloudinary.   

> **NOTE**: UI labels may vary slightly between Windows Server and AD FS versions.

#### Create a relying party trust

1. Open the **AD FS Management** console.
1. In the **Actions** pane, click **Add Relying Party Trust**.
1. Choose **Claims aware**, then click **Start**.
1. Select **Enter data about the relying party manually**, then click **Next**.
1. Enter `Cloudinary` as the **Display name**, then click **Next**.
1. Select **AD FS profile**, then click **Next**.
1. Since a token encryption certificate is not required, click **Next**.
1. Check **Enable support for the SAML 2.0 WebSSO protocol**.
1. Set **Relying party SAML 2.0 SSO service URL** to: `https://cloudinary.com/saml/consume` then click **Next**.
1. Enter your Cloudinary **cloud name** (available in your Cloudinary Console dashboard) in the **Relying party trust identifier** field, then click **Next**.
1. Configure multi-factor authentication, or skip this step if not required.
1. Select which users are permitted to access Cloudinary, then click **Next**.
1. Review the configuration, click **Next**, then click **Close**.

> **NOTE**: Cloudinary does not auto-provision users. Users must already exist in the Cloudinary account to be able to sign in via SSO.

#### Configure claim issuance policy

1. Click **Edit Claim Issuance Policy**.
1. Under the **Issuance Transform Rules** tab, click **Add Rule**.
1. Select **Send LDAP Attributes as Claims**, then click **Next**.
1. Enter a claim rule name (for example, `Get Attributes`) and configure:
 * **Attribute store:** `Active Directory`
 * **LDAP Attribute:** `E-Mail-Addresses`
 * **Outgoing Claim Type:** `E-Mail Address`
1. Click **Finish**.
1. Click **Add Rule** again under the **Issuance Transform Rules** tab.
1. Select **Transform an Incoming Claim**, then click **Next**.
1. Enter a claim rule name (for example, `Name ID Transform`) and configure:
 * **Incoming claim type:** `E-Mail Address`
 * **Outgoing claim type:** `Name ID`
 * **Outgoing name ID format:** `Email`
 * Select **Pass through all claim values**
1. Click **Finish**, then click **OK**.

#### Update relying party advanced settings

1. Open **Relying Party Trusts**, under **Trust Properties** , and select the **Properties** for **Cloudinary**.
1. Open the **Advanced** tab and change the **Secure hash algorithm** to:
 ```
 SHA-1
 ```
1. Click **OK**.

#### Enable Forms Authentication (if required)

This step is required **only if Forms Authentication is not already enabled**.  
Note that enabling Forms Authentication applies globally to all configured sites.

1. Go to **Edit Authentication Policies**.
1. Under **Primary Authentication Global Settings**, click **Edit**.
1. Under **Intranet**, enable **Forms Authentication**, then click **OK**.

Alternatively, you can enable Forms Authentication as a fallback method using PowerShell:

```powershell
Set-AdfsGlobalAuthenticationPolicy -PrimaryIntranetAuthenticationProvider @('WindowsAuthentication','FormsAuthentication')
```

#### Get Identity Provider metadata

The Identity Provider metadata URL, usually under the **Sign On** tab, typically uses the following format:

```URL
https://sts.<your_domain>/federationmetadata/2007-06/FederationMetadata.xml
```

Copy this URL and within the Cloudinary Console:

* Go to **Settings > Account Security > SAML Configuration**
* Set the **Metadata retrieval method** to **URL** and copy the URL above.

Cloudinary uses this metadata to automatically retrieve the signing certificate and SAML configuration.

### Configure Google Workspace for Cloudinary SAML

You can configure Cloudinary SSO using Google Workspace (formerly G Suite) as your SAML identity provider.

#### Configure SAML in Google Admin
1. Create a **Custom SAML App** and follow steps 1–5 in [Google’s guide](https://support.google.com/a/answer/6087519) for configuring a custom SAML application.  
1. At step 6 of the Google setup, download the **IDP metadata file**.
1. Continue with the remaining steps as instructed and in the **Service Provider Details**, use the following values:
   * **ACS URL:** `https://cloudinary.com/saml/consume`
   * **Entity ID:** `https://cloudinary.com/saml`
   * **Name ID Format:** `EMAIL` 

Though the Certificate details may vary, here is an example of a setup:
   ![SSO Google Workspace](https://cloudinary-res.cloudinary.com/image/upload/f_auto/q_auto/bo_1px_solid_grey/v1732799370/docs/DAM/saml_google_workspace.png "thumb: w_775,dpr_2, width: 775")

#### Configure SAML in the Cloudinary Console
1. Go to **Account Settings > Account Security > SAML Configuration**.
1. Set the **Metadata retrieval method** to **Inline**, and copy the IDP metadata you downloaded.

After completing these steps, users can sign in to Cloudinary using Google SSO.

> **NOTE**: Cloudinary user accounts must already exist for each SSO user unless you enable [SAML provisioning](#saml_provisioning).

### Configure Auth0 for Cloudinary SAML

You can configure Cloudinary SSO using Auth0 as your SAML identity provider.

#### Configure SAML in Auth0

1. In the Auth0 Dashboard, go to **Applications** and create a new application.

2. Give your application a name, for example, `Cloudinary SAML Integration`, and select **Regular Web Application** as the application type.

3. In the application **Settings**, click **Show Advanced Settings**, then open the **Endpoints** tab. In the **SAML** section, copy the **SAML Metadata URL**. You'll use this URL when configuring SAML in the Cloudinary Console.

4. Open the **Addons** tab and enable **SAML2 Web App**.

5. In the **SAML2 Web App** settings, configure the Application Callback URL: `https://console.cloudinary.com/saml/consume`

6. Configure the SAML NameID to use the user's email address. For example, in the add-on's JSON settings, include the email claim in `nameIdentifierProbes`:

    ```json
      {
       "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
       "nameIdentifierProbes": [
       "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
       ]
      }
    ```
    
7. Create or verify the users who need access to Cloudinary, and ensure they're assigned to the Auth0 application.

8. To test authentication, open the application's **Usage** tab and copy the **Identity Provider Login URL**. Use this URL to initiate login and verify that the user can authenticate and return to Cloudinary.

> **NOTES**:
>
> * The `cloudinary.com` domain is being deprecated in favor of `console.cloudinary.com`. To ensure compatibility with all login flows, configure your IdP to support both ACS domains where possible. If your IdP doesn't support adding an additional domain, use `console.cloudinary.com` and ensure you can log in successfully.

> * Auth0 SAML applications can have authentication connections enabled or disabled. If you use an authentication method other than the defaults, ensure the relevant connection is enabled for this application.

#### Configure SAML in the Cloudinary Console

1. Go to **Settings** > **Account Security** > **SAML Configuration**.

2. Set the **Metadata retrieval method** to **URL**.

3. Paste the **SAML Metadata URL** copied from Auth0.

4. Save the configuration.

After completing these steps, users can sign in to Cloudinary using Auth0 SSO.

> **NOTE**: Cloudinary user accounts must already exist for each SSO user unless you enable SAML provisioning.

### Considerations for SAML provisioning with Cloudinary 

* A new SAML provisioned user to Cloudinary isn't sent an email inviting them to set a password. 
* All users' names and sources are available via the [User Management](https://console.cloudinary.com/app/settings/user-management) page of the Console Settings. Therefore, the Cloudinary Console can also be used for reviewing and updating auto-provisioned user accounts, except for password related fields and options.
* If a user had an account in Cloudinary before the SAML integration and uses the same email in your IdP, the user will now log in through the IdP but will continue to use the same account in Cloudinary. 
* Folder-level permissions, collection-level permissions, etc. can't be set directly for users. They're indirectly controlled by the user group associations.
* Cloudinary uses the [username](#saml_fields) field as a unique immutable ID for creating a new user in your Cloudinary account. If any supplied attributes change (including possibly the user email, groups and product environment associations), the user account details will be updated accordingly. This means you should use a unique value for the 'username' field (e.g., if you use the user's email as a username you won't be able to update their email address using a SAML assertion in the future).
* With SAML Provisioning, any login request must include all mandatory fields in the assertion message, where attributes and values are case-sensitive.
* The SAML protocol supports only provisioning. Deprovisioning should be handled with custom code using the [Provisioning API](provisioning_api#tag/users). If SSO is enforced on the account, users will not be able to log in if access is removed on the identity provider.
* **([Roles and Permissions][new-permissions-link])** Make sure the product environments listed in `CloudinaryRole` match those provisioned via `CloudinarySubAccounts`. If they don't match, the user gets access to all product environments for the specified role.

## Error handling

On a failed log-in to Cloudinary, SAML errors are returned to the user's browser in the response body of a 400 error. The response includes an Error Code and Description where possible.

Error | Description 
---|---
1 | USER_CREATION_ERROR
2 | MISSING_ACCOUNT_ID
3 | INVALID_ACCOUNT_ID
4 | MISSING_FIRST_NAME
5 | MISSING_EMAIL
6 | INVALID_EMAIL_ADDRESS
7 | ROLE_LOOKUP_ERROR
8 | INVALID_SUBACCOUNT_IDENTIFIER
9 | LICENSE_LIMIT_EXCEEDED
10 | USER_UPDATE_ERROR
11 | PROVISIONING_NOT_ALLOWED
12 | USER_ACCOUNT_MISMATCH
13 | USER_GROUP_CREATION_ERROR
14 | INVALID_NAME_ID
15 | SAML_VALIDATION_FAILED
16 | INVALID_SAML_RESPONSE
17 | ROLE_SCOPE_MISMATCH
18 | TOO_MANY_SUBACCOUNTS
