Has anyone ever managed to connect to SQL using ODBC and MFA?
Has anyone ever managed to connect to SQL using ODBC and MFA?
Yes, you need to use ActiveDirectoryInteractive as your Authentication method
(eg) Here is the connection string for connecting to a SQL Azure db - replace myservername with the name of your server and MyDatabaseName with the name of your database on that server
ODBC;DRIVER=ODBC Driver 18 for SQL Server;SERVER=myservername.database.windows.net;DA TABASE=MyDatabaseName;Authentication=ActiveDirecto ryInteractive;Encrypt=yes;TrustServerCertificate=n o;Connection Timeout=30;
If you are interested in ADO - this is using m365 login
Provider=MSOLEDBSQL19;Data Source=.myservernamedatabase.windows.net;Initial Catalog=MyDatabaseName;Authentication=ActiveDirect oryInteractive;Encrypt=Yes;TrustServerCertificate= No;Connect Timeout=30;User ID=myname@mytenant.com;