Meteen naar de inhoud

How to create a Service Principal?

  • door
serviceprincipel

Password-based authentication

Without any authentication parameters, password-based authentication is used with a random password created for you.


Azure CLI: az ad sp create-for-rbac –name ServicePrincipalName –role Contributor


This example adds the Reader role and removes the Contributor one:

az role assignment create –assignee APP_ID –role Reader
az role assignment delete –assignee APP_ID –role Contributor

Sign in using a service principal

Test the new service principal’s credentials and permissions by signing in. To sign in with a service principal, you need theĀ appid, tennant and credentials.

To sign in with a service principal using a password:

az login --service-principal --username APP_ID --password PASSWORD --tenant TENANT_ID

Geef een reactie