This section describes how to configure SSO using Cloud Identity for
Contact Center AI Platform (CCAI Platform). When configured, you can
use enterprise-wide Cloud Identity credentials to sign into
Contact Center AI Platform (CCAI Platform) and the agent adapter. Cloud Identity SSO uses the
Security Assertion Markup Language (SAML) authentication protocol.

Cloud Identity acts as the SAML identity provider (IdP) by using a custom SAML
app in the Google Admin console. Custom SAML apps are available in both Cloud Identity
Free and Cloud Identity Premium. For more information, see
[Set up your own custom SAML app](https://support.google.com/a/answer/6087519).

> [!NOTE]
> **Note:** If your organization uses Google Workspace, see [Configure SSO using Google Workspace](https://docs.cloud.google.com/contact-center/ccai-platform/docs/sso-workspace.md.txt).

## Before you begin

To configure SSO using Cloud Identity, be sure you have the following:

- Cloud Identity super administrator credentials for the Google Admin console
- An SSO URL
- An entity ID
- An email mapping field, usually `NameID`
- A SAML certificate (in Base64)
- CCAI Platform administrator credentials

Each user who signs in with SSO must also exist as a user in
CCAI Platform, with an email address that matches their Cloud Identity
primary email address. For more information, see
[Add, view, and edit users](https://docs.cloud.google.com/contact-center/ccai-platform/docs/add-edit-user.md.txt).

> [!CAUTION]
> **Caution:** If you're enabling SSO on an existing instance, verify that your administrator email address is registered as a user in the CCAI Platform instance before you change the login method to SAML. Otherwise, you might not be able to sign in to the instance.

## Configure Cloud Identity for SSO

To configure Cloud Identity, follow these steps:

1. Sign in to the [Google Admin console](https://admin.google.com) with a
   super administrator account.

2. Go to **Apps \> Web and mobile apps**.

3. Click **Add app**.

4. Select **Add custom SAML app**.

5. In the **App name** field, enter a name that helps you identify this SAML
   app, such as `CCAI Platform instance SSO`.

6. Click **Continue**.

   The **Google Identity Provider details** page displays. Google offers two
   options for getting the IdP information that the CCAI Platform
   instance needs. For CCAI Platform, use the second option.
7. Copy the **SSO URL** and **Entity ID** , and download the **Certificate**.

Keep this page open. You return to it after you configure your
CCAI Platform instance.

## Configure your CCAI Platform instance for SSO

To configure SSO for your CCAI Platform instance, follow these steps:

1. In the Google Cloud console, go to the project selector dashboard and select the project that contains your instance.

   [Project selector dashboard](https://console.cloud.google.com/projectselector2/home/dashboard)

   <br />

2. In the navigation menu, click **CCAI Platform** .


   [CCAI Platform instances](https://console.cloud.google.com/contact-center-ai-platform)

   <br />

   The **CCAI Platform instances** page displays.
3. In the **Name** column, click the instance that you want to configure SSO for.
4. On the **CCAI Platform instance Detail** page, click **Edit**.
5. For the login method, select **SAML**.
6. In the **Single sign-on URL** field, enter your SSO URL.
7. In the **Entity ID** field, enter your entity ID.
8. In the **Email field mapping** field, keep the default value `NameID`, or enter the exact SAML attribute name from your IdP that maps to the user's email address. This value is case-sensitive and can't contain spaces.
9. In the **Authentication contexts** field, select the authentication context that you want. If your IdP configuration doesn't require the authentication context to be specified, then leave this field empty. For more information, see [Authentication context](https://docs.cloud.google.com/contact-center/ccai-platform/docs/authentication-context.md.txt).
10. In the **Certificate** field, enter your SAML certificate. Be sure to include `---BEGIN CERTIFICATE---` and `---END CERTIFICATE---` from the certificate.
11. Click **Save**.

## Add your CCAI Platform instance service provider details into the Cloud Identity SAML app configuration

1. Return to the Google Admin console and click **Continue**.

2. On the **Service provider details** page, enter the following details:

   - Enter the **ACS URL** : `https://{my_instance_id}.ccaiplatform.com/saml/v1/consume`

   - Enter the **Entity ID** : `https://{my_instance_id}.ccaiplatform.com/saml/v1/metadata`

   - Enter the **Start URL** : `https://{my_instance_id}.ccaiplatform.com/`

   - Set the **Name ID format** to **EMAIL**.

   - Set **Name ID** to **Basic Information \> Primary email**.

3. Click **Continue**.

4. On the **Attribute mapping** page, click **Finish**. CCAI Platform
   doesn't require additional attribute mappings.

## Turn on the SAML app for your users

By default, a new custom SAML app is turned off for all users. To turn it on,
follow these steps:

1. In the Google Admin console, go to **Apps \> Web and mobile apps** and click
   the SAML app that you created.

2. Click **User access**.

3. Select the organizational unit or group that contains the users who need
   access to CCAI Platform.

4. Select **ON** (or **ON for everyone** when turning it on for all users),
   and then click **Save** (or **Override** for an inherited organizational
   unit).

Changes can take up to 24 hours to take effect, but typically happen more
quickly.

## Verify SSO authentication

To verify SSO authentication, follow these steps:

1. Go to the agent adapter in your customer relationship management (CRM)
   application.

2. Click **Login with company SSO**. A sign-in page displays.

3. Sign in with your Cloud Identity credentials.