You are transitioning a .NET web application hosted on an Azure App Service named `web-prod` from using a system-assigned managed identity to a new user-assigned managed identity named `id-prod`. The application retrieves secrets from an Azure Key Vault named `kv-prod` using the `DefaultAzureCredential` class. The system-assigned identity must remain temporarily enabled during the migration to prevent configuration issues, but the application must immediately begin using the new user-assigned identity to authenticate. You need to configure the resource association and access permissions using the Azure CLI, and update the application configuration. Arrange the steps in the correct order to achieve this transition while preventing application authorization errors during the configuration process.
- 1Run the `az identity create` command to create the user-assigned managed identity `id-prod`.
- 2Run the `az webapp identity assign` command to associate the `id-prod` identity with the `web-prod` App Service.
- 3Run the `az role assignment create` command to assign the 'Key Vault Secrets User' role to the principal ID of `id-prod` at the Key Vault scope.
- 4Add an App Setting to the App Service named `AZURE_CLIENT_ID` containing the client ID of the `id-prod` identity.
- 5Deploy the application code that instantiates `DefaultAzureCredential` and uses it to retrieve secrets from the Key Vault.