# How to get Client ID, Tenant ID  and Client Secret in Microsoft Azure

PrerequisitesYou must have an Azure account with permissions to register applications in the Microsoft Entra tenant.&#x20;

### Step 1: Find your Tenant ID

1. Sign in to the Azure portal.
2. In the search bar, type "Microsoft Entra ID" and select the service from the results.
3. On the **Overview** page, find the **Directory (tenant) ID**.
4. Copy this ID and save it in a secure location.&#x20;

### Step 2: Create an App Registration (Client ID)&#x20;

1. In the Microsoft Entra ID menu, select **App registrations** under the "Manage" section.
2. Select **+ New registration**.
3. On the "Register an application" page:
   * Enter a meaningful **Name** for the application (e.g., "MyTestApp").
   * Under **Supported account types**, select an option based on your needs (e.g., "Accounts in this organizational directory only" is recommended for most applications).
   * **Redirect URI:** [**https://quote.storeify.app/oauth/callback** ](<https://quote.storeify.app/oauth/callback >) **(IMPORTANT)**.
4. Select **Register**.
5. After the app is created, you will be on its **Overview** page. Find and copy the **Application (client) ID**. This is your **client ID**.
6. Save the client ID in a secure location.&#x20;
7. Head over to **API Permission** section in your app and add **Microsoft Graph permissions**.

<figure><img src="/files/3EUqcX1VSjJ5jKrwIk8x" alt=""><figcaption></figcaption></figure>

8. Select **Delegated Permissions** for `IMAP.AccessAsUserAll`, `SMTP.Send` and `offline_access`, then click "Add permissions"

<figure><img src="/files/G6pkvK2aOeRaNWoWhv40" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qNKeh2VJc4pg3OHar9Ex" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/sOX2CG6XgTuwXNbZtySr" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/X32rgAzEWhK4jVAMHGTS" alt=""><figcaption></figcaption></figure>

### Step 3: Generate the Client Secret&#x20;

1. From your app registration's left-hand menu, under "Manage", select **Certificates & secrets**.
2. Under the **Client secrets** section, select **+ New client secret**.
3. A dialog box will appear:
   * Provide a **Description** for the secret.
   * Select a duration for when the secret will **Expire**. Microsoft recommends choosing one year for easier tracking.
4. Select **Add**.
5. **Important**: The **Value** of the client secret is displayed only this one time. Be sure to copy the value immediately and save it in a secure location. You cannot retrieve it later. The **Secret ID** is not the value you need for authentication.&#x20;

You have now successfully obtained your tenant ID, client ID, and client secret, which are used to authenticate your application with Microsoft Entra ID


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://quote-guide.storeify.app/integration/how-to-get-client-id-tenant-id-and-client-secret-in-microsoft-azure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
