Hi Marouf Ali,
Thank you for reaching out to us on the Microsoft Q&A forum.
"AuthorizationFailed" error usually means that your account doesn’t have permission to do this action in the resource group. In the Azure Learn sandbox environment (Concierge subscription), some permissions are limited, so you may not have full access to create all types of resources.
You could try the following steps to troubleshoot and potentially resolve the issue:
1.Make sure your account has the "Contributor" role assigned to the resource group. In a sandbox environment, you should typically have the necessary permissions, but if there's a problem with the assignment, it could lead to this error.
You might find this referral thread helpful as well: Authorization Failed.
2.If you're using a sandbox provided by Microsoft Learn, there might be a problem with the sandbox session. You can try restarting / reactivating the sandbox environment from the learning module and then run the command again.
For more assistance, you can refer to this helpful thread: Create an Azure Virtual Machine: Your deployment failed.
3.Make sure the resource group ID matches exactly what you see in the portal. Sometimes, there are multiple resource groups with similar names in the subscription, so double-check that you’re using the correct one.
4.If you successfully create a VM using the Azure CLI within the same subscription, it should appear in both the Azure CLI and the Azure Portal. They share the same backend, so any VM created through the CLI will also be visible in the portal, and vice versa.
Question: Also, I think the RGs in the sandbox are just temporary, so they can't be seen in the Azure portal list of resources. But, in actuality, is it different?
Yes, you’re correct.
In the Azure Learn sandbox, resource groups and other resources are temporary and only exist for the duration of your session, so they won’t appear in the main Azure Portal after that. In a regular Azure subscription, resource groups and resources are permanent they remain until you choose to delete them and are visible in the Azure Portal. You have full control over them, including setting permissions, which is different from the sandbox where your permissions are limited.
Troubleshooting common training issues in Microsoft Learn: https://learn.microsoft.com/en-us/training/support/troubleshooting
If challenges persist, please attach relevant screenshots for further assistance, ensuring all privacy details are concealed before posting.
Thank you.
If you've found the provided answer helpful, please click the "Accept Answer/Upvote" button. This will be beneficial to other members of the Microsoft Q&A forum community.