Skip to main content
Azure credentials store an Azure service principal used to provision and manage Azure Kubernetes Service (AKS). Ankra authenticates with the client-credentials grant against Microsoft Entra ID and reads the subscription’s locations, Kubernetes versions, VM SKUs, quota and virtual networks to build the catalogue, then creates and operates AKS clusters in the resource groups it owns or adopts.

Least-privilege roles

Do not grant Contributor on the whole subscription. Scope the service principal to what Ankra does: Grant Network Contributor on the resource group of the virtual network too when the subnet lives elsewhere. If you would rather not grant resource-group creation at the subscription, create the group yourself and name it at cluster creation (aks.resource_group); Ankra adopts it and never deletes it.
The Azure Kubernetes Service Contributor Role lets the principal retrieve the cluster admin kubeconfig, which Ankra needs to install its agent. Scope it to the resource groups Ankra manages, not the subscription.

Before you start

  • A role in Ankra with credentials.write (the built-in owner and admin roles have it). See Credentials.
  • Permission in Microsoft Entra ID to create an application and assign roles on the subscription and resource groups.

Creating an Azure credential

1

Create the service principal

Note the appId (client ID), password (client secret) and tenant. The secret is shown once - store it in a secret manager, not in a shell history or a ticket.
2

Assign the roles

Repeat the resource-group assignments for every group Ankra will manage.
3

Store it in Ankra

Go to Integrations & alerts → Credentials, click Add credential, and under Cloud providers choose Microsoft Azure. Enter a Name (3 to 100 lowercase letters, digits and single hyphens; it cannot change later), the Subscription ID, Tenant ID, Client ID and Client secret.Click Test the connection. You see The connection works. Then click Add credential; Ankra validates the principal again before storing it, and the credential’s page opens.

Rotating the secret

  1. Create a new secret on the application in Microsoft Entra ID.
  2. In Ankra, open the credential, click Settings & access, and under Replace the secret enter the New client secret (and the New client ID if you moved to another application; leave a field empty to keep it). Click Check and replace.
  3. When you see The secret is replaced, delete the old secret in Entra ID.
Ankra checks the new secret with Microsoft Azure before it stores it, so a rejected secret leaves the working one in place. The client secret is write-only: Stored values never shows it. See Replace the secret.