> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hotglue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CMiC

# Connector Details

| Name | Value |
| :- | :- |
| Platform | [CMiC](https://www.cmicglobal.com/) |
| Auth Type | OAuth 2.0 Client Credentials |
| Direction | Bidirectional |
| Tap Repo | [https://github.com/hotgluexyz/tap-cmic](https://github.com/hotgluexyz/tap-cmic) |
| Target Repo | [https://github.com/hotgluexyz/target-cmic](https://github.com/hotgluexyz/target-cmic) |

# Credentials Setup

Follow the steps below to get the credentials needed to connect CMiC to Hotglue using **OAuth 2.0 Client Credentials**.

This guide covers **CMiC Patch 22 or later** only.

Official CMiC references:

* [OAuth – Client Credential Flow with CMiC](https://docs.cmicglobal.com/portal/Content/E_Reference_Material/OAuth/References/OAuth_Client_credentials_flow_CMiC.htm)
* [OAuth – Overview with CMiC](https://docs.cmicglobal.com/portal2/Content/CMiC_Assist/SYS_OAUTH/Reference/SYS_OAUTH_Overview_with_CMiC.htm)

Complete Microsoft Entra first, then finish everything in CMiC.

1. [Register an app in Microsoft Entra ID](#1-register-an-app-in-microsoft-entra-id)
2. [Create a service user in CMiC](#2-create-a-service-user-in-cmic)
3. [Register the app in CMiC API Security](#3-register-the-app-in-cmic-api-security)

You need:

* Admin access to **Microsoft Entra ID** (Azure AD)
* Admin access to **CMiC**

***

## 1. Register an app in Microsoft Entra ID

1. Sign in to the [Azure Portal](https://portal.azure.com).
2. Open **Microsoft Entra ID**.
3. On the Overview page, click **+ Add** → **App registration**.
4. Enter a name (for this example, we used `cmic-oauth2`).
5. Under **Supported account types**, select **Single tenant** (your organization only).
6. Under **Redirect URI**, choose **Web** and enter:

```text theme={null}
<Web App URL>/oauth/callback
```

Use your environment’s **Web App URL** from the table below.

| Environment | Web App URL (Redirect URI host) |
| :- | :- |
| Atlas Prod | [https://atlas.cmiccloud.com](https://atlas.cmiccloud.com) |
| Atlas Test | [https://atlas-test.cmiccloud.com](https://atlas-test.cmiccloud.com) |
| Nova Prod | [https://nova.cmiccloud.com](https://nova.cmiccloud.com) |
| Nova Test | [https://nova-test.cmiccloud.com](https://nova-test.cmiccloud.com) |
| Partner Sandbox | [https://partner-sandbox.cmiccloud.com](https://partner-sandbox.cmiccloud.com) |

Source: [Cloud Web APP and API URLs](https://developers.cmicglobal.com/v1/docs/cloud-api-server-urls).

7. Click **Register**.

### Copy your IDs

After registration, you land on the app **Overview** page:

<img src="https://mintcdn.com/hotglue/LXUlxj9KgwFwdd8X/connectors/images/cmic/entra-app-overview.png?fit=max&auto=format&n=LXUlxj9KgwFwdd8X&q=85&s=e85137274bb281931dfca7d6d0a138ac" alt="Microsoft Entra app Overview page after registration. Copy Application (client) ID and Directory (tenant) ID from Essentials." width="3022" height="1726" data-path="connectors/images/cmic/entra-app-overview.png" />

Copy and save these two values from **Essentials**:

* **Application (client) ID** — this is your **Client ID**
* **Directory (tenant) ID** — this is your **Tenant ID**

### Create a client secret

1. On the app **Overview** page, under **Essentials**, click **Client credentials**.
2. This opens **Certificates & secrets**. Open the **Client secrets** tab.
3. Click **New client secret**.
4. Add a description, choose an expiry, and click **Add**.
5. Copy the secret **Value** right away (you will not see it again). This is your **Client Secret**.

You are done in Entra. Keep the **Client ID**, **Tenant ID**, and **Client Secret** for the next steps.

***

## 2. Create a service user in CMiC

Create a dedicated CMiC user for this integration (not a person’s everyday login).

Official CMiC guide: [System Data – Create New User for Cloud](https://docs.cmicglobal.com/portal2/Content/CMiC_Assist/SYS_SD/How_To/SYS_SD_Create_New_User_Cloud.htm).

1. Sign in to your CMiC web app.
2. Go to **System Data** → **Security** → **Users** → **User Maintenance**.
3. Click **Create New User**. This opens the **User Setup** page:

<img src="https://mintcdn.com/hotglue/LXUlxj9KgwFwdd8X/connectors/images/cmic/cmic-user-setup.png?fit=max&auto=format&n=LXUlxj9KgwFwdd8X&q=85&s=cf8dd513ee12b70b20ebd4ba75bcb5e2" alt="CMiC User Setup page with User Profile and Security sections." width="3022" height="1726" data-path="connectors/images/cmic/cmic-user-setup.png" />

4. Fill in the **User Profile** fields. Example:

| Field | Example |
| - | - |
| **Existing Contact** | On (toggle label becomes **New Contact** when enabled) |
| **External User** | On (toggle label becomes **Internal User** when enabled) |
| **Username** | Choose a service username |
| **First Name / Last Name** | Choose a first and last name for this service user |
| **Email Address** | Use an email your team monitors |
| **Partner** | Click the magnifying glass and select your company |
| **Contact** | Fills in automatically after you select the company |
| **LDAP Name** | `Default` |
| **Financials Console** | Optional — for example, your default Financials console |
| **xProjects Console** | Optional — for example, your default xProjects console |

5. Under **Security**, assign the roles this service user needs (or copy them from a similar access user).
6. Click **Create**.
7. On **Finish Setup**, follow the steps shown, then click **Ok**.
8. Check the confirmation email sent to the address you entered, and follow the steps there to finish setting up the user.

***

## 3. Register the app in CMiC API Security

1. In CMiC, go to **System Data** → **API Management** → **Setup** → **API Security**.
2. At the top of the page, open the **App Registration** step.
3. Click **Insert** and fill in:

| Field | What to enter |
| - | - |
| **Description** | For example, `Hotglue OAuth` |
| **Application ID** | **Client ID** |
| **Issuer URL** | `https://sts.windows.net/<TENANT_ID>/` (include the trailing `/`) |
| **JSON Web Keyset URL** | `https://login.microsoftonline.com/<TENANT_ID>/discovery/v2.0/keys` |
| **Service User** | The service user from step 2 |
| **System Defined** | Unchecked |
| **GCS** | Unchecked |
| **Auth URL** | `https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/authorize` |
| **Token URL** | `https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token` |
| **Scope** | `api://<CLIENT_ID>/.default` |

4. Click **Save**.

## Checklist

* [ ] Entra app registered
* [ ] **Client ID**, **Client Secret**, and **Tenant ID** stored
* [ ] CMiC service user created
* [ ] CMiC App Registration saved
