Description:
Managed service identity in App Service provides more security by eliminating secrets from the app, such as credentials in the connection strings. When registering with Azure Active Directory in App Service, the app will connect to other Azure services securely without the need for usernames and passwords.
Rationale:
App Service provides a highly scalable, self-patching web hosting service in Azure. It also provides a managed identity for apps, which is a turn-key solution for securing access to Azure SQL Database and other Azure services.
From Azure Portal
From Azure CLI
To set Register with Azure Active Directory feature for an existing app, run the following command:
az webapp identity assign --resource-group --name
From PowerShell
To register with Azure Active Directory feature for an existing app, run the following command:
Set-AzWebApp -AssignIdentity $True -ResourceGroupName -Name