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.
Log in to the Azure portal.
in the top search bar, search for Microsoft Entra ID.
Step 2: Register the Application
In the Microsoft Entra ID pane, select App registrations.
Click on New registration.
Enter a Name for your application (e.g., "MyApp").
Choose the Supported account types based on your requirements (e.g., Single tenant).
Optionally, enter a Redirect URI if you plan to use this for authentication flows involving user interaction.
Click Register.
Step 3: Note the Application (client) ID and Directory (tenant) ID
After registering, you will be redirected to the application’s overview page.
Copy the Application (client) ID and Directory (tenant) ID. These are your
clientId
andtenantId
, respectively.
Step 4: Create a Client Secret
In the left-hand menu, select Certificates & secrets (in the same pane of the application’s overview page).
Under Client secrets, click New client secret.
Add a description (e.g., "MyAppSecret") and set an expiration period.
Click Add.
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
In the Azure portal, click on Subscriptions.
Select the subscription you want to use.
Copy the Subscription ID from the subscription overview. This is your
subscriptionId
.
3️⃣ Get Your Resource Group Name
In the Azure portal, click on Resource groups.
Select the resource group that contains your resources.
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.
In the Azure portal, go to the Resource groups.
Select the resource group containing your Azure OpenAI resource.
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:
In the Azure portal, go to the Resource groups.
Select the resource group containing your Azure OpenAI resource.
Step 2: Assign a Role to the Application:
Click Access control (IAM) in the left-hand menu.
Click Add role assignment.
In the Role drop-down, select the role Cognitive Services Contributor.
In the Assign access to drop-down, select User, group, or service principal.
In the Select field, search for your registered application by name, select it, and click Save.
Review and Assign the role.
6️⃣ Configure your AIConnection in Promptitude.io
Go to your AzureAI connection and select the option Show models:
Click on the synchronise models button to configure the properties:
Configure all the properties you previously obtained in order to get your available models. Make sure that the properties are correct:
If everything went well you will see your available models in the table: