100 days of azure - day 1

hello

I see this the whole time :

az sshkey create --name devops-kp --resource-group DevOpsRG --encryption-type RSA
(AuthorizationFailed) The client 'kk_lab_user_main-8bdeeba40f9c472d@azurefreekmlprod.onmicrosoft.com' with object id 'f6284239-fad2-4194-855f-60862f74ddb3' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/resourcegroups/DevOpsRG' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed
Message: The client 'kk_lab_user_main-8bdeeba40f9c472d@azurefreekmlprod.onmicrosoft.com' with object id 'f6284239-fad2-4194-855f-60862f74ddb3' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/f0c3bcdd-5ce2-4fa0-8cf3-41559747512b/resourcegroups/DevOpsRG' or the scope is invalid. If access was recently granted, please refresh your credentials.

How to solve this ?

Hi @rwobben

Just go to the Azure portal and create an SSH key as required by the task.


oke, so I do not have to do this task with the cli ?

You certain can do it with the CLI – I did. Steps:

  1. First get the resource group by doing az group list.
  2. Then the command looks like:
az sshkey create --name datacenter-kp --resource-group kml_rg_main-WHAT-YOU-GOT-IN-STEP-1

This is simple, and works.