I'm investigating using Azure user-assigned managed identities to access SQL Server from our application which uses EntityFramework 6. I have gotten it to work using this package: https://www.nuget.org/packages/ErikEJ.EntityFramework.SqlServer and connection strings with the following attributes:
Authentication=Active Directory Managed Identity;User Id=<clientId of managed identity>;
However, when running locally I have to use
Authentication=Active Directory Interactive;
It would be better if there were a way to impersonate the managed identity locally in some way so that any schema access issues can be debugged locally. (We have multiple different schemas that different identities can use). Is there any way to do this? I am getting lost in documentation and tutorials at this moment. Any solution would have to work in .NET Core 3.1 and .NET Framework 4.7.2.