PS C:\Users\loginid> az login A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. 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": "85cb24e4-0bcf-4767-b44b-39eae544706e", "id": "bd435e85-b401-48c5-90ad-96dbefac1503", "isDefault": true, "managedByTenants": [], "name": "Visual Studio Professional", "state": "Enabled", "tenantId": "85cb24e4-0bcf-4767-b44b-39eae544706e", "user": { "name": "sunny_hll@hotmail.com", "type": "user" } } ]
Az Terraform example
1 2 3 4 5 6 7 8 9 10 11 12 13 14
PS C:\Users\loginid> az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/bd435e85-b401-48c5-90ad-96dbefac1503" Creating 'Contributor' role assignment under scope '/subscriptions/bd435e85-b401-48c5-90ad-96dbefac1503' The output includes credentials that you must protect. Be sure that you do not include these credentials in your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli { "appId": "414b5739-2c30-4cea-adff-d5c8ff1c6470", "displayName": "azure-cli-2022-12-09-06-36-24", "password": "if48Q~Wd6aUHekpKNLrgJWeC3Pr-sstzZHRXfa90", "tenant": "85cb24e4-0bcf-4767-b44b-39eae544706e" }