0

How can we connect to Azure SQL Database from MAC using AAD?

SQL Login works fine with AUthentication type : Username/Password but not sure how to use my domain account to connect while i am doing it fine from a windows machine .

1 Answer 1

0

Just per my experience, if you want to connect Azure SQL Database from MacOS, you need to install Microsoft ODBC Driver for SQL Server first on MacOS. Except Microsoft JDBC driver for SQL Server on MacOS, ODBC Driver is the only way to connect Azure SQL Database on MacOS.

Generally on Azure portal, there are three types of connection string for ODBC as the figure below.

enter image description here

  1. SQL authentication
  2. Azure Active Directory password authentication
  3. Azure Active Directory integrated authentication

For authentication with Azure AD in odbc, please refer to the offical document Using Azure Active Directory with the ODBC Driver. But as the note content as the figure below,

enter image description here

Due to only Windows driver can connect using Active Directory Integrated authentication via specify Authentication=ActiveDirectoryIntegrated in the connection string, the only way to connect using Azure AD with odbc on MacOS is using Azure Active Directory password authentication via specify Authentication=ActiveDirectoryPassword in the connection string.

I think you have read the offical document Connect Excel to a single database in Azure SQL database and create a report to connect Azure SQL Database on Windows. So if you can set the connection string of Authentication=ActiveDirectoryPassword with MS ODBC driver for SQL Server in Excel on MacOS, you can do it as same as on Windows.

For more details about MS ODBC driver with AAD, you can refer to my answer for the SO thread How to connect to Azure sql database with python SQL alchemy using Active directory integrated authentication.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.