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

# 1. Create the TOTAL Application in Azure

### 1.1 — Create the Enterprise Application

1. Sign in to the [Entra Portal](https://entra.microsoft.com/#home)
2. In the left sidebar, click **Enterprise applications**
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-19.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=0e492c8f4358e4c43d83233a4d677ac0" alt="Image" width="227" height="516" data-path="images/image-19.png" />
   </Frame>
3. Click **New application** (top left)
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-20.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=b5f004dd2c2d3831e8bed6c82d5a1f70" alt="Image" width="1130" height="270" data-path="images/image-20.png" />
   </Frame>
4. Click **Create your own application**
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-21.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=f00d4bab5ef8b0c6781a0acc179c4968" alt="Image" width="1106" height="707" data-path="images/image-21.png" />
   </Frame>
5. Give it a name — we recommend **"TOTAL"**
6. Select **"Integrate any other application you don't find in the gallery"**
7. Click **Create**
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-23.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=a21c1a775cebc9744f75ea910094ef7c" alt="Image" width="495" height="712" data-path="images/image-23.png" />
   </Frame>

### 1.2 — Register the Application to Get Credentials

You now need to create an App Registration, which is where Azure issues the credentials TOTAL uses to verify sign-ins.

1. In the Azure search bar, search for **App registrations** and open it
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-24.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=c1b96ae7c479cd0476553d66f2d40d84" alt="Image" width="229" height="450" data-path="images/image-24.png" />
   </Frame>
2. Find the app you just created and click it (it should appear under "All applications")
   <Frame>
     <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-25.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=3de20b8d6c20bc61d0ce4b76429d4219" alt="Image" width="1128" height="476" data-path="images/image-25.png" />
   </Frame>
3. You are now on the app registration page. From the left sidebar:

**Collect your Tenant ID and Client ID:**

* Click **Overview**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-26.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=50eab9ccbc80a6ed21de76dee1df190f" alt="Image" width="1100" height="529" data-path="images/image-26.png" />
  </Frame>
* Copy the **Application (client) ID** — enter into the TOTAL enrollment console
* Copy the **Directory (tenant) ID** — enter into the TOTAL enrollment console

**Create a Client Secret:**

* Click **Certificates & secrets** in the left sidebar
* Click **New client secret**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-27.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=15ab2ddb471682db1c5cda320f1a090a" alt="Image" width="1111" height="556" data-path="images/image-27.png" />
  </Frame>
* Enter a description (e.g. "TOTAL integration") and choose an expiry (24 months recommended)
* Click **Add**
* **Copy the secret Value immediately** — it is only shown once. If you navigate away, you must create a new one.
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-28.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=d67859b19e509719c3e3a6b5f6d4d0f3" alt="Image" width="857" height="102" data-path="images/image-28.png" />
  </Frame>
* Save this value and enter it into the TOTAL enrollment console

**Configure the Redirect URI (where Microsoft sends users after sign-in):**

* Click **Authentication** in the left sidebar
* Click **Add Redirect URI** → select **Web**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-29.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=628d41bb4c7579394b15e6a7b7597942" alt="Image" width="1124" height="720" data-path="images/image-29.png" />
  </Frame>
* In the **Redirect URIs** field, enter the value given in the TOTAL Enrollment console (it will look like `https://app.yourtotal.com/auth/oidc/callback`).
* Click **Configure**, then **Save**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-30.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=05c4cf04e87d2971c4001215a1119a69" alt="Image" width="489" height="708" data-path="images/image-30.png" />
  </Frame>

**Grant API permissions (required for sign-in and provisioning to work):**

* Click **API permissions** in the left sidebar
* Click **Add a permission** → **Microsoft Graph**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-31.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=adb1c8d59df609e8658eb42d4f754cce" alt="Image" width="1114" height="714" data-path="images/image-31.png" />
  </Frame>
* Click **Delegated Permissions**
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-32.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=3993d541aa4c3e4933db3bc7d4387113" alt="Image" width="494" height="250" data-path="images/image-32.png" />
  </Frame>
* Search for and add: `openid`, `profile`, `email`
  <Frame>
    <img src="https://mintcdn.com/truu-2/3LLfmLFet64q30Kk/images/image-33.png?fit=max&auto=format&n=3LLfmLFet64q30Kk&q=85&s=84184e96e8f2675d18fc2de818019f82" alt="Image" width="701" height="472" data-path="images/image-33.png" />
  </Frame>
* Click **Add permissions**
* Navigate back to the "Overview" screen and, again, click **Add a permission** → **Microsoft Graph**
  <Frame>
    <img src="https://mintcdn.com/truu-2/lysPZKP2ACPZg67h/images/image-116.png?fit=max&auto=format&n=lysPZKP2ACPZg67h&q=85&s=0f02dfeb38e80bf1ecab35df8a4dfd05" alt="Image" width="1114" height="714" data-path="images/image-116.png" />
  </Frame>
* Click **Application Permissions**
  <Frame>
    <img src="https://mintcdn.com/truu-2/lysPZKP2ACPZg67h/images/image-113.png?fit=max&auto=format&n=lysPZKP2ACPZg67h&q=85&s=9a89bf4befc319448619b8147ef2b05a" alt="Image" width="494" height="250" data-path="images/image-113.png" />
  </Frame>
* Search for and add: `User.ReadBasic.All, GroupMember.Read.All`
  <Frame>
    <img src="https://mintcdn.com/truu-2/lysPZKP2ACPZg67h/images/image-115.png?fit=max&auto=format&n=lysPZKP2ACPZg67h&q=85&s=453f937a92ccce1710d2319d31bb55f7" alt="Image" width="1012" height="674" data-path="images/image-115.png" />
  </Frame>
  <Frame>
    <img src="https://mintcdn.com/truu-2/xaR211b3DL0oSs-p/images/image-55.png?fit=max&auto=format&n=xaR211b3DL0oSs-p&q=85&s=4653f2aafc8c401c4089211c42e15244" alt="Image" width="1674" height="306" data-path="images/image-55.png" />
  </Frame>
* Click **Add permissions**

> These scopes are required. `profile` tells Azure to include the user's Object ID (`oid`) in the sign-in token — which is how TOTAL identifies each user. `email` includes their email address. Without these, sign-in will fail. **Why these are required:**
>
> * `profile` / `email` / `openid` — required for sign-in. `profile` includes the user's Object ID (`oid`), which is how TOTAL identifies each user.
> * `GroupMember.Read.All` — required to let TOTAL query Microsoft and see whether a user belongs to certain groups when needed to confirm access immediately.
> * `User.ReadBasic.All`— required so TOTAL can query Microsoft Graph for users’ basic directory profile (for example name and UPN) when it needs to resolve or show who someone is

* Click **Grant Admin Consent** to apply changes

<Frame>
  <img src="https://mintcdn.com/truu-2/lysPZKP2ACPZg67h/images/image-117.png?fit=max&auto=format&n=lysPZKP2ACPZg67h&q=85&s=a31fa799c0b3f731c35410591fa8ae70" alt="Image" width="1011" height="280" data-path="images/image-117.png" />
</Frame>
