Configuring access to Azure resources by assigning roles
If a user in your organization needs permission to access Azure resources, you need to assign the user to the appropriate role in Azure. In this section, we are going to assign administrator access to a user for a VM. First, we need to run a script in Azure Cloud Shell to create the VM. Let's get started:
- Navigate to the Azure portal by opening https://portal.azure.com.
- Open Azure Cloud Shell.
- First, we need to create a new resource group:
az group create --location eastus --name PacktVMResourceGroup
- Then, we need to create the VM:
az vm create ' --resource-group PacktVMResourceGroup ' --name VM1 ' --image win2016datacenter ' --admin-username packtuser ' --admin-password PacktPassword123
- Now that we have the VM in place, we can configure access to the VM for the user. Open the
PacktVMResourceGroup
resource group and select VM1 from the list.You will be redirected to the VM settings...