You can enable MSI for your Azure resources in the Azure portal, PowerShell, or the CLI and by using ARM templates. In this demonstration, we are going to enable this in the Azure portal for the Azure web app that we created earlier in this chapter:
- Navigate to the Azure portal by opening https://portal.azure.com.
- Go to PacktWebApp that we created earlier.
- From the overview blade of the web app, in the left menu under Settings, click Identity.
- In the next blade, you can create a system-assigned or user-assigned managed identity. We are going to create a System assigned identity for this demo. Change the status to On and click Save:
Managed identity settings
- When the managed identity is created, we can assign permissions to it to access the Key Vault. Therefore, we first need to create the Key Vault. We will add the Key Vault to the same resource group that the web app is in. We will do this using...