One of the challenges, when you build applications for the cloud, is how to manage the credentials in code for authentication. Keeping those credentials secure is key, so ideally these credentials will never appear on developer workstations and aren't checked into source control as well. You can use Azure Key Vault for securely storing credentials, keys, and secrets, but the application still needs to authenticate to Key Vault to retrieve them.
Managed identities solves this problem. It is a feature of Azure AD, which provides Azure services with an automatically managed identity in Azure AD. You can then use this identity to authenticate to every server that supports Azure AD authentication, including Key Vault, without any credentials in your code.
When you enable managed identities on your Azure resource, such as a virtual machine, Azure Function, or app, Azure will create a service principal and store the credentials of that service principal...