Skip to main content
All CollectionsAI Providers & ModelsAI ConnectionsMicrosoft Azure
[AI Connection] How to Obtain Azure IDs and Credentials
[AI Connection] How to Obtain Azure IDs and Credentials
Promptitude Team avatar
Written by Promptitude Team
Updated over a month ago

To use Azure services programmatically, you need to obtain several key identifiers and credentials. This guide will help you gather the following information:

  • tenantId

  • clientId

  • clientSecret

  • subscriptionId

  • resourceGroupName

  • accountName

Prerequisites

  • An active Azure subscription

  • Access to the Azure portal

Table of Contents


Step-by-Step Guide

1️⃣ Register a New Application in Microsoft Entra ID

Step 1: Navigate to Microsoft Entra ID.

  1. Log in to the Azure portal.

  2. in the top search bar, search for Microsoft Entra ID.

Step 2: Register the Application

  1. In the Microsoft Entra ID pane, select App registrations.

  2. Click on New registration.


  3. Enter a Name for your application (e.g., "MyApp").

  4. Choose the Supported account types based on your requirements (e.g., Single tenant).

  5. Optionally, enter a Redirect URI if you plan to use this for authentication flows involving user interaction.

  6. Click Register.

Step 3: Note the Application (client) ID and Directory (tenant) ID

  1. After registering, you will be redirected to the application’s overview page.

  2. Copy the Application (client) ID and Directory (tenant) ID. These are your clientId and tenantId, respectively.

Step 4: Create a Client Secret

  1. In the left-hand menu, select Certificates & secrets (in the same pane of the application’s overview page).

  2. Under Client secrets, click New client secret.

  3. Add a description (e.g., "MyAppSecret") and set an expiration period.

  4. Click Add.

  5. Copy the value of the client secret. This is your clientSecret. Note it down securely, as it won't be shown again.

2️⃣ Obtain Your Subscription ID

  1. In the Azure portal, click on Subscriptions.

  2. Select the subscription you want to use.

  3. Copy the Subscription ID from the subscription overview. This is your subscriptionId.

3️⃣ Get Your Resource Group Name

  1. In the Azure portal, click on Resource groups.


  2. Select the resource group that contains your resources.

  3. Copy the Resource group name. This is your resourceGroupName.

4️⃣ Find Your Account Name

For services like Azure OpenAI, you need the specific name of the service account.

  1. In the Azure portal, go to the Resource groups.

  2. Select the resource group containing your Azure OpenAI resource.

  3. Copy the Name of the resource from the overview page. This is your accountName.

5️⃣ Assign the Application to a Role on the Azure OpenAI Resource

Step 1: Navigate to Your Azure OpenAI resource:

  1. In the Azure portal, go to the Resource groups.

  2. Select the resource group containing your Azure OpenAI resource.

Step 2: Assign a Role to the Application:

  1. Click Access control (IAM) in the left-hand menu.


  2. Click Add role assignment.


  3. In the Role drop-down, select the role Cognitive Services Contributor.


  4. In the Assign access to drop-down, select User, group, or service principal.


  5. In the Select field, search for your registered application by name, select it, and click Save.


  6. Review and Assign the role.

6️⃣ Configure your AIConnection in Promptitude.io

  1. Go to your AzureAI connection and select the option Show models:


  2. Click on the synchronise models button to configure the properties:

  3. Configure all the properties you previously obtained in order to get your available models. Make sure that the properties are correct:


  4. If everything went well you will see your available models in the table:

Did this answer your question?