From 1234c2908d7d977856c4ad225eec5ebf1978f816 Mon Sep 17 00:00:00 2001 From: Oleg Kunitsyn Date: Mon, 29 Sep 2025 10:41:18 +0200 Subject: [PATCH 1/2] [ODM-12835] Fixes after Mikhail Smazhevsky review --- .../getting-access-token-azure.md | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md b/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md index c1ca6cc..006a5c3 100644 --- a/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md +++ b/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md @@ -1,6 +1,6 @@ # Getting Access Token (Azure) -This guide explains how to authenticate against an API protected by Azure AD using a **Bearer token**. +This guide explains how to authenticate against the ODM API protected by Azure AD using a **Bearer token**. We’ll walk through installing the Azure CLI, obtaining the token, and then passing it in request headers. --- @@ -9,13 +9,13 @@ We’ll walk through installing the Azure CLI, obtaining the token, and then pas Before starting, ensure you have the following: -1. **Azure CLI installed** +1. **Azure CLI installed** Follow the official installation guide: 👉 [Install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) -2. **ID required for login** - - * **Application (Client) ID**: identifies the registered application you’re requesting a token for. +2. **Application ID required for login** + It identifies the registered application you're requesting a token for. + It is recommended to get this ID from your ODM Administrator. --- @@ -55,9 +55,9 @@ This will return a long JWT string (the **Bearer token**), for example: --- -## 3. Use the Bearer Token in API Calls +## 3. Use the Bearer Token in ODM API Calls -Pass the token in the `Authorization` header when making API requests. +Pass the token in the `Authorization` header when making ODM API requests. Here’s an example using `curl`: ```bash @@ -67,11 +67,7 @@ curl -X GET \ -H "Authorization: Bearer " ``` -Replace `` with the value returned from the previous step. - ---- - -## 4. Example Response +Replace `` with the actual ODM address, `` with the value returned from the previous step. If authentication is successful, you’ll receive a valid JSON response from the API. Example: @@ -88,13 +84,3 @@ If authentication is successful, you’ll receive a valid JSON response from the "data": [] } ``` - ---- - -## Summary - -1. **Install Azure CLI** from the [official guide](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). -2. Have your **Application (Client) ID** ready. -3. **Login** with `az login --scope api:///default`. -4. **Get token** using `az account get-access-token --scope api:///default`. -5. **Send requests** with `Authorization: Bearer ` header. From 95893f9abbfcd7208a84516d8ce898c90b23f3d7 Mon Sep 17 00:00:00 2001 From: Oleg Kunitsyn Date: Mon, 29 Sep 2025 10:47:28 +0200 Subject: [PATCH 2/2] [ODM-12835] Slightly better formatting --- .../user-guide/doc-odm-user-guide/getting-access-token-azure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md b/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md index 006a5c3..fd679cd 100644 --- a/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md +++ b/docs/user-guide/doc-odm-user-guide/getting-access-token-azure.md @@ -14,7 +14,7 @@ Before starting, ensure you have the following: 👉 [Install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) 2. **Application ID required for login** - It identifies the registered application you're requesting a token for. + It identifies the registered application you're requesting a token for. It is recommended to get this ID from your ODM Administrator. ---