Create a Managed Identity

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

Automation and Security go hand-in-hand in the Cloud services of today, and securely representing Azure Resources to the Authentication services that validate them is a common requirement.

In this hands-on lab, engineers create a User Assigned Managed Identity, deploy a virtual machine member server to Azure, and then attach the Managed Identity to it. In addition to utilizing the User Assigned Identity, a System Assigned Identity will also be enabled to demonstrate automation at work.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a User Assigned Managed Identity

Create a User Assigned Managed Identity with the name of MythicalUAMI001. When creating it, use West US when asked a location and a resource group; it should be the only available option.

Create and Deploy a Virtual Machine

Note: Use ‘West US’ when asked location and asked for a resource group; the only available option.

Deploy a VM:

  1. The VM name can be anything (MythicalVM001 in this example)
  2. The VM should be imaged with Windows Server 2019.
  3. The VM Size should be B2ms.
  4. Username/Password can be anything (mythicaladmin and Crystal1Montana! in this example).
  5. Change Public Inbound Ports to ‘None’.
  6. Set NIC NSG to Advanced.
  7. Set Boot Diagnostics to Off.
Associate UAMI and enable SAMI

Navigate back to your Virtual Machine, then scroll down to the Identity link on the left-hand menu. Click Identity. There, attach the User assigned managed identity. Then enable System assigned managed identity.

Additional Resources

As Cloud Engineers with the Mythical Corp, we are tasked with building an Azure VM that can host code authenticated via both a User Assigned and System Assigned Managed Identity. We will create a Managed Identity, deploy a Windows VM to Azure, and then associate the User Assigned Managed Identity to the VM, followed lastly by enabling the System Assigned Managed Identity. As this environment is administrated by a client, we will not be able to verify the Azure AD side of these objects.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?