EntityFramework-Reverse-POCO-Code-First-Generator icon indicating copy to clipboard operation
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard

Azure MFA

Open sjh37 opened this issue 5 years ago • 5 comments

How I could use the reverse poco generator on SQL database that uses Azure MFA as it’s authentication method? When I attempt to access the database I receive the following error.

Running transformation: Failed to read database schema (private List<StoredProcedure> LoadStoredProcs) - Cannot find an authentication provider for 'ActiveDirectoryInteractive'.

Documentation: https://docs.microsoft.com/en-us/azure/azure-sql/database/active-directory-interactive-connect-azure-sql-db

sjh37 avatar Jan 12 '21 20:01 sjh37

Note from Bryan Tichy:

I believe that this may be related to using a outdated version of the SQL Server assemblies. I will try replacing the current version with a newer reference.

sjh37 avatar Feb 03 '21 14:02 sjh37

Any progress on this? I would really appreciate to be able to use Azure AD integration to keep usernames and passwords out of the config file!

xenod avatar Jul 02 '21 14:07 xenod

Sorry @xenod no progress on this case. I still need to investigate it. The example code in the link above looks straight forward, However I can see that the example program relies on the Microsoft.IdentityModel.Clients.ActiveDirectory DLL assembly, which might not be available to the generator as its a T4 template and runs outside of your project, and therefore has no access to your NuGet packages. If its a problem, the Microsoft.IdentityModel.Clients.ActiveDirectory could be added to the GAC which would then allow the generator to use it.

sjh37 avatar Jul 02 '21 16:07 sjh37

Any progress on this? I don't have option to use UID and PWD.

hero3616 avatar Nov 08 '22 15:11 hero3616

Hi @hero3616 In terms of keeping usernames and passwords out of the config file, take a look at the wiki

It shows you how to can use an environment variable instead. Let me know if that helps.

sjh37 avatar Nov 08 '22 15:11 sjh37