Microsoft Azure Blob Retention Policy

Overview

To manage Azure Blob retention policies via WebAPI, you must obtain the following credentials:

  1. Tenant ID

  2. Client ID

  3. Client Secret

  4. Access Token

These values are required to authenticate and interact with Azure endpoints for retention policy operations.


What Is a Tenant and How to Get a Tenant ID in Azure?

A tenant represents your organization in Microsoft cloud services.

To get your Tenant ID:

  1. Log in to the Azure portal.

  2. Go to Entra ID > Properties.

  3. Copy the value from the Directory ID field — this is your Tenant ID.

To create a new tenant:

  1. Select Create a resource.

  2. Search for and select Entra ID.

  3. Provide a name for your new directory.

  4. A Tenant ID will be auto-generated.

Azure portal - create a new Entra ID tenant
Create New Tenant

What Is a Client ID and How to Create It?

A Client ID (or Application ID) identifies your app to Azure AD.

To generate it:

  1. Go to your Azure directory.

  2. Click App registrations > New registration.

New App Registration
App Registration
  1. Select the Single-tenant option and click Register.

Single tenant registration
Choose Single-Tenant
  1. Go to Authentication, select app type as Web, and configure redirect URI.

Authentication tab configuration
Configure Authentication
Add redirect URI
Web Redirect URI
  1. The app will now show an Application ID — this is your Client ID.

Application ID shown in portal
Client ID (Application ID)

Add a Client Secret

To create a Client Secret:

  1. Open your app under App registrations.

  2. Go to Certificates & secrets > New client secret.

New Client Secret
Create Client Secret
  1. Enter a description, select a duration, and click Add.

  2. Copy the Client Secret ID and Value — they are shown only once.

Secret ID and Value
Client Secret Values
  1. Go to IAM settings and assign roles to your app via Add role assignment.

Add IAM Role
Role Assignment

Generate Access Token

To generate an Access Token, follow these steps:

Step 1: Request Authorization Code

Send a GET request:

Last updated

Was this helpful?