MIcrosoft Azure portal

As per my test script requirement I am establishing database connection with sql server using Database Library and pyodbc and it was working perfectly fine with all my queries get executed and verify the query result with UI data

DatabaseLibrary.Connect To Database   pyodbc  ${DBName}   ${DBUser}   ${DBPass}   ${DBHost}   ${DBPort}   

But now what happen our admin change the authentication method to sql server from SQL Server authentication to Azure Active Directory - Universal with MFA so now my script is failing


Can someone please provide me solution for this?

Hi Gituwalia

I am no expert on this library, but a quick search about the problem turned up this → Connect to Azure SQL in Python with MFA Active Directory Interactive Authentication without using Microsoft.IdentityModel.Clients.ActiveDirectory dll

It seems you need to somehow pass Authentication='Active Directory Interactive' to pyodbcperhaps with dbConfigFile, but I’m not sure.

Hopefully someone with more experience with this library can give you better guidance,


Hello… Is your problem resolved. I am also trying to connect my azure database to robot framework. so need your inputs on same. Could you please help me if you are able establish connection.