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

To create a client ID, tenant ID, and client secret in Microsoft Azure, you need to register an application in Microsoft Entra ID (formerly Azure Active Directory).

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

#### **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.

#### **Step 2: Create an App Registration (Client ID)**

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://sl.storeify.app/oauth/callback**](https://sl.storeify.app/oauth/callback) **(**<mark style="color:$danger;">**IMPORTANT**</mark>**)**.
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.
7. Head over to **API Permission** section in your app and add **Microsoft Graph permissions**.

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FhIugIxSeJsClZi3l9XtL%2Fimage.png?alt=media&#x26;token=f324e603-f101-43f7-9d90-5251af997e40" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FrdUnHrS8dsEkpinkua6Y%2Fimage.png?alt=media&#x26;token=a675beab-fec2-4133-aa6a-af03c3833308" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FTdLXz6N4Y71zlk2zp3Zx%2Fimage.png?alt=media&#x26;token=80fe030d-75ff-4dc4-8420-e56c5df11f77" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FTO0SyinhUonblliKsesh%2Fimage.png?alt=media&#x26;token=a3e3e0fe-de11-4b6e-b15c-a7d5988e51a9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FLf35BV4HxUBMklf5oZqB%2Fimage.png?alt=media&#x26;token=b64a9fa3-3bf2-4b76-9006-431cf2b03be0" alt=""><figcaption></figcaption></figure>

#### **Step 3: Generate the Client Secret**

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.

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