Example of Azure AD Managed Service Identity in .net core
https://docs.microsoft.com/en-us/azure/active-directory/msi-overview
Other examples are available at the bottom of https://azure.microsoft.com/en-us/blog/keep-credentials-out-of-code-introducing-azure-ad-managed-service-identity/