# CLOUDEX for Admins only

# Admin settings

# Office365: How to get TenantId, ClientId and ClientSecret?

If you use Microsoft office 365 for email sending. Your company Microsoft admin need to get following settings from **Azure AD Application**

- **Directory (Tenant) ID**
- **Application (Client) ID**
- **Client Secret Value**

These three values are required for integrating CLOUDEX TMS with Microsoft Graph using OAuth2.

---

#### **1️⃣ Sign in to Azure Portal**

Open: [https://portal.azure.com<svg class="block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]" data-rtl-flip="" fill="currentColor" height="20" viewbox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"></svg>](https://portal.azure.com/)Sign in with a Microsoft 365 **Global Admin** or **Application Administrator** account.

---

#### **2️⃣ Open “Microsoft Entra ID” (Azure AD)**

Left menu → **Microsoft Entra ID**  
(or search “Entra ID” in the top search bar)

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/bIGimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/bIGimage.png)

---

#### **3️⃣ Create a new App Registration**

1. Left menu: **App registrations**
2. Click **New registration**

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/v39image.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/v39image.png)

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/sKGimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/sKGimage.png)

<div id="bkmrk-url-type-must-be-%22we"><div>URL type must be "Web" NOT "Single page application"</div><div>Looks like beter to register as Single tenant. If you register as multi tenant then can be so than you need to enter CLOUDEX <span data-olk-copy-source="MessageBody">MpnId 7086574</span> </div><div>  
</div><div>**Fill the form:**</div></div><div id="bkmrk-field-value-name-clo"><div><table class="w-fit min-w-(--thread-content-width)" data-end="1440" data-start="1145"><thead data-end="1162" data-start="1145"><tr data-end="1162" data-start="1145"><th data-col-size="sm" data-end="1153" data-start="1145">Field</th><th data-col-size="md" data-end="1162" data-start="1153">Value</th></tr></thead><tbody data-end="1440" data-start="1181"><tr data-end="1239" data-start="1181"><td data-col-size="sm" data-end="1192" data-start="1181">**Name**</td><td data-col-size="md" data-end="1239" data-start="1192">CLOUDEX TMS Email Integration (or any name)</td></tr><tr data-end="1335" data-start="1240"><td data-col-size="sm" data-end="1270" data-start="1240">**Supported account types**</td><td data-col-size="md" data-end="1335" data-start="1270">✔️ **Accounts in any organizational directory (multitenant)**</td></tr><tr data-end="1440" data-start="1336"><td data-col-size="sm" data-end="1355" data-start="1336">**Redirect URI**</td><td data-col-size="md" data-end="1440" data-start="1355">Select **Web** → Enter your redirect:   
`https://my.cloudex.app/<strong>YourCompanyCode</strong>/Services/Office365Callback.aspx`

1\) Replace `<strong>YourCompanyCode</strong>` with your web app CompanyCode

2\) Redirect URL is case-sensitive

</td></tr></tbody></table>

</div></div>Click **Register**.

---

#### **4️⃣ Get the Tenant ID and Client ID**

After creation, you will be redirected to the app’s **Overview** page.  
Here you will see:  
**✔ Directory (Tenant) ID**  
**✔ Application (Client) ID**

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/cxSimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/cxSimage.png)

<div id="bkmrk-copy-them-and-save."><div>Copy them and save.</div></div>You already have **2/3 values**.

---

#### **5️⃣ Create Client Secret**

Side menu → **Certificates &amp; secrets**

1. Click **New client secret**
2. Enter a name: `CLOUDEX Secret`
3. Choose expiration:
    
    
    - 6 months (not recommended)
    - 12 months
    - **24 months** (recommended)
    - Or “Custom”
4. Click **Add**

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/Finimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/Finimage.png)

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/jzGimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/jzGimage.png)

<div id="bkmrk-important-%E2%9A%A0%EF%B8%8F"><div>IMPORTANT ⚠️</div></div>**Copy the Client Secret VALUE immediately.**  
You will never be able to see it again later.

Store it securely (Azure Key Vault, password manager, etc).

Now you have:

- **ClientId**
- **TenantId**
- **ClientSecret Value**

---

#### **6️⃣ Add Required API Permissions**

Side menu → **API permissions**

Click:

- **Add a permission**
- **Microsoft Graph**
- **Delegated permissions**

Search + select:

✔ `Mail.ReadWrite`✔ `Mail.Send`  
✔ `Mail.SendShared`  
✔ `offline_access`✔ ``User.Read``  
<span style="color: rgb(224, 62, 45);">!!!</span> If email sending does not work, then add also following permissions  
✔ `email`  
✔ `openid`✔ `profile`

Then click **Add permissions**.  
Then click **Grant admin consent**.

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/o6Fimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/o6Fimage.png)

Can be in new interface need to choose Microsoft Graph API

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/bJiimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/bJiimage.png)

---

#### **7️⃣ Final Check: Authentication Settings**

Side menu → **Authentication**

Ensure:

✔ Your redirect URI is correct  
✔ “Allow public client flows” is **OFF**  
✔ “Access tokens” and “ID tokens” are **ON**

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/K1Uimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/K1Uimage.png)

<div id="bkmrk--16"><div>  
</div></div>#### 🎉 DONE — Values ready to use

You now have everything:

<div id="bkmrk-parameter-where-to-f"><div><table class="w-fit min-w-(--thread-content-width)" data-end="3236" data-start="2994"><thead data-end="3026" data-start="2994"><tr data-end="3026" data-start="2994"><th data-col-size="sm" data-end="3006" data-start="2994">Parameter</th><th data-col-size="sm" data-end="3026" data-start="3006">Where to find it</th></tr></thead><tbody data-end="3236" data-start="3059"><tr data-end="3116" data-start="3059"><td data-col-size="sm" data-end="3074" data-start="3059">**TenantId**</td><td data-col-size="sm" data-end="3116" data-start="3074">App → Overview → Directory (tenant) ID</td></tr><tr data-end="3176" data-start="3117"><td data-col-size="sm" data-end="3132" data-start="3117">**ClientId**</td><td data-col-size="sm" data-end="3176" data-start="3132">App → Overview → Application (client) ID</td></tr><tr data-end="3236" data-start="3177"><td data-col-size="sm" data-end="3196" data-start="3177">**ClientSecret**</td><td data-col-size="sm" data-end="3236" data-start="3196">App → Certificates &amp; Secrets → **Value**</td></tr></tbody></table>

</div></div>#### Problem solution

In case you have any problems sending out emails from CLOUDEX TMS or Ozols you can run **"Diagnose and solve problems"** tool

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/fssimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/fssimage.png)

# How to change APPLICATION Callback URL in Azure Portal?

#### **1️⃣ Open Azure Portal**

Go to: [https://portal.azure.com](https://portal.azure.com/)  
  
Sign in using a **Global Administrator** or **Application Administrator** account.

---

#### **2️⃣ Open *Microsoft Entra ID***

1\) In the left menu, click: **Microsoft Entra ID or Search for App registrations** 2) Open All Applications  
3\) Open CLOUDEX TMS application

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/vYaimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/vYaimage.png)

Choose Redirect URLs

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/CQOimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/CQOimage.png)

Press edit button and set correct URL

!!!! In YourCompanyCode you should place your company code https://my.cloudex.app/YourCompanyCode/Services/Office365Callback.aspx

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-06/scaled-1680-/eTZimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-06/eTZimage.png)

Redirect URL should be under Web NOT under SIngle-application

# Shipment integrations

# How to send shipment data to Cloudex TMS via API?

Use the **Cloudex TMS API** when shipments created in another system need to be automatically imported into Cloudex TMS.

This is typically the first step of a shipment integration between an external TMS, ERP, customer system, or another application and Cloudex TMS.

#### Before you start

You need:

- access to the Cloudex TMS API;
- a valid **Cloudex API key**;
- access to the Cloudex TMS API documentation.

See: **How to create API key**

Full Cloudex TMS API documentation: [https://my.cloudex.lv/cloudex-api/swagger/index.html](https://my.cloudex.lv/cloudex-api/swagger/index.html)

#### Which endpoint should be used?

To create/import a shipment in Cloudex TMS, use the: **shipment-manifest** endpoint.

The external system sends the shipment information to Cloudex TMS using this endpoint.

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-07/scaled-1680-/8kaimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-07/8kaimage.png)

#### Integration flow

A typical shipment integration works as follows: **External system → Shipment manifest → Cloudex TMS**

#### Related articles

- [**How to create API key**](https://help.cloudex.app/books/cloudex-tms/page/how-to-create-api-key)

# How to send shipment milestones to Cloudex TMS via API?

Use the **Cloudex TMS API milestones endpoint** when an external system needs to update Cloudex TMS about the progress of an existing shipment.

Examples include shipment milestone/status updates such as:

- Shipment loaded;
- Shipment delivered.

#### Before you start

The shipment must already exist in Cloudex TMS and the external system must be able to identify which Cloudex TMS shipment the milestone belongs to.

You also need:

- access to the Cloudex TMS API;
- a valid Cloudex API key.

Full Cloudex TMS API documentation: [https://my.cloudex.lv/cloudex-api/swagger/index.html](https://my.cloudex.lv/cloudex-api/swagger/index.html)

#### Which endpoint should be used?

To send shipment milestone/status updates to Cloudex TMS, use the: **milestones** endpoint.

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-09/scaled-1680-/4ocimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-09/4ocimage.png)

#### Integration flow

A typical integration works as follows: **External system → Shipment milestone/status → Cloudex TMS**

For example, when the shipment is marked as delivered in the connected external system, the corresponding milestone can be sent to Cloudex TMS.

This allows Cloudex TMS to keep the shipment status synchronized with the connected system without requiring users to update the shipment manually.

#### Related articles

- [**How to send shipment documents to Cloudex TMS via API?**](https://help.cloudex.app/books/cloudex-for-admins-only/page/how-to-send-shipment-documents-to-cloudex-tms-via-api)
- [**How to create API key**](https://help.cloudex.app/books/cloudex-tms/page/how-to-create-api-key)

# How to send shipment documents to Cloudex TMS via API?

Use the **Cloudex TMS API documents endpoint** when documents from an external system need to be attached to a shipment in Cloudex TMS.

Typical examples are:

- POD (Proof of Delivery);
- CMR;
- other shipment-related documents.

#### Before you start

The shipment must already exist in Cloudex TMS and the external system must be able to identify which shipment the document belongs to.

You also need:

- access to the Cloudex TMS API;
- a valid Cloudex API key.

Full Cloudex TMS API documentation: [https://my.cloudex.lv/cloudex-api/swagger/index.html](https://my.cloudex.lv/cloudex-api/swagger/index.html)

#### Which endpoint should be used?

To send shipment documents to Cloudex TMS, use the: **documents** endpoint.

[![image.png](https://help.cloudex.app/uploads/images/gallery/2026-09/scaled-1680-/Pihimage.png)](https://help.cloudex.app/uploads/images/gallery/2026-09/Pihimage.png)

#### Integration flow

A typical document integration works as follows: **External system → Shipment document → Cloudex TMS shipment**

For example, once a signed POD or CMR becomes available in the connected system, it can be sent automatically to Cloudex TMS and linked to the corresponding shipment.

This reduces the need to manually download documents from one system and upload them again into Cloudex TMS.

## Related articles

- [**How to send shipment milestones to Cloudex TMS via API?**](https://help.cloudex.app/books/cloudex-for-admins-only/page/how-to-send-shipment-milestones-to-cloudex-tms-via-api)
- [**How to create API key**](https://help.cloudex.app/books/cloudex-tms/page/how-to-create-api-key)