Skip to main content

Create Service Principal

An Azure Service Principal with the Reader role over a subscription can be created from Azure CLI:

az ad sp create-for-rbac \
  --name pandora-azure-application-gateway-discovery \
  --role Reader \
  --scopes /subscriptions/<SUBSCRIPTION_ID>

The command returns an output similar to this:

{
  "appId": "<CLIENT_ID>",
  "displayName": "pandora-azure-application-gateway-discovery",
  "password": "<CLIENT_SECRET>",
  "tenant": "<TENANT_ID>"
}

The mapping with the plugin fields is:

tenant       -> Azure Tenant ID
appId        -> Azure Client ID
password     -> Azure Client Secret
subscription -> Azure Subscription ID