2
votes

I want to connect to my Azure SQL server using Azure Active Directory Authentication in a .Net Core App 1.1 .

On using a connection string similar to the following connection string:

Data Source=n9lxnyuzhv.database.windows.net; Authentication=Active Directory Integrated; Initial Catalog=testdb;

I get this exception:

System.ArgumentException: 'Keyword not supported: 'authentication'.'

I understand that AAD Auth is available for SQL servers in .Net Framework 4.6 and above. Is it possible to connect to server through AAD in .Net Core Apps. If so, how?

Any help is appreciated.

1

1 Answers

1
votes

For now, .Net Core does not support for Microsoft Active Directory Authentication Library for Microsoft SQL Server. Please refer to this feedback.

With the Active Directory Admin set for the Azure SQL Server you are able to login to the SQL server with SQL Server Management Studio. On all client machines, from which your applications or users connect to Azure SQL Database or Azure SQL Data Warehouse using Azure Active Directory users / applications, you must install the following software:

  • .NET Framework 4.6 or later

  • Azure Active Directory Authentication Library for SQL Server (ADALSQL.DLL) is available in multiple languages (both x86 and amd64)

This blog maybe helpful.