Azure App Service Web app does not have a Managed Service Identity
Description
Managed service identity in App Service makes the app more secure by eliminating secrets from the app, such as credentials in the connection strings. When registering with Azure Active Directory in the app service, the app will connect to other Azure services securely without the need of username and passwords.
Fix - Runtime
In Azure Console
- Log in to the Azure portal.
- Navigate to App Services.
- Click on the reported App.
- Under Setting section, Click on 'Identity'.
- Ensure that 'Status' is set to 'On'.
Fix - Buildtime
Terraform
- Resource: azurerm_app_service
- Argument: identity.type
resource "azurerm_app_service" "example" {
...
+ identity {
+ type = "SystemAssigned"
}
}