Open the Azure Cloud Shell and select Bash
.
Run the az account show
command and make sure Azure Subscription you selected is your intended choice.
az account show
Run the az ad sp create-for-rbac
command to create a new Service Principal.
After that, you should save the credential generated and outputted on the console.
az ad sp create-for-rbac --name=provisioning-owner\
--role="Owner"\
--scopes=/subscriptions/$(az account show --query='id' --output=tsv)
{
"appId": "xxxxxxxx-0000-0000-0000-xxxxxxxxxxxx",
"displayName": "provisioning-owner",
"password": "********",
"tenant": "zzzzzzzz-0000-0000-0000-zzzzzzzzzzzz"
}