# 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="https://1818632981-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjbICnwGwANWvU46mHWcU%2Fuploads%2FmkjbgTQgpERzELZq4Szu%2Fimage.png?alt=media&#x26;token=fc2f1a22-d92e-4ae9-802e-3edfb1c32aaf" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1818632981-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjbICnwGwANWvU46mHWcU%2Fuploads%2FwDk5iym3mjJzuzl7kR2X%2Fimage.png?alt=media&#x26;token=5bb714e5-06db-4262-87e0-cc005ada8ea1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1818632981-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjbICnwGwANWvU46mHWcU%2Fuploads%2FJbILl8oHstobcW3hQPde%2Fimage.png?alt=media&#x26;token=525880d2-d5c0-402f-a4b9-28a254c2761a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1818632981-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjbICnwGwANWvU46mHWcU%2Fuploads%2FGZv9FMzmUrA4Vwns8LzW%2Fimage.png?alt=media&#x26;token=d8efb23e-6d4c-474e-9ede-ff64006f6541" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1818632981-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjbICnwGwANWvU46mHWcU%2Fuploads%2FRgMfRjo8zeqd3w9kGp4O%2Fimage.png?alt=media&#x26;token=c2b70a7d-9813-4831-94c3-3dc40926631e" 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
