PS C:\Users\asus\azure> az login
A web browser has been opened at Sign in to your account. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with az login --use-device-code
.
[
{
“cloudName”: “AzureCloud”,
“homeTenantId”: “0d7cc8e9-be54-45cc-b2e3-041a9b45aa57”,
“id”: “b2aec48f-6dad-4d57-ad25-dad521fe74a4”,
“isDefault”: true,
“managedByTenants”: [],
“name”: “KodeKloud Azure Production Labs”,
“state”: “Enabled”,
“tenantId”: “0d7cc8e9-be54-45cc-b2e3-041a9b45aa57”,
“user”: {
“name”: “[email protected]”,
“type”: “user”
}
}
]
PS C:\Users\asus\azure> # Create a resource group in South Central US region
PS C:\Users\asus\azure> az group create --name new-rg --location southcentralus
(AuthorizationFailed) The client ‘[email protected]’ with object id ‘4c9e36d6-35ee-4bca-b184-410709303556’ does not have authorization to perform action ‘Microsoft.Resources/subscriptions/resourcegroups/write’ over scope ‘/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourcegroups/new-rg’ or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed
Message: The client ‘[email protected]’ with object id ‘4c9e36d6-35ee-4bca-b184-410709303556’ does not have authorization to perform action ‘Microsoft.Resources/subscriptions/resourcegroups/write’ over scope ‘/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourcegroups/new-rg’ or the scope is invalid. If access was recently granted, please refresh your credentials.
PS C:\Users\asus\azure>
The Azure Playground does not allow you to create Resource Groups. You can use the
ODL-azure-nnnnnn Resource Group that has been created for you.