1

I've been looking to see if .NET 4.8.0 supports Azure Interactive Authentication for environments where MFA is used.

Looking online it says it's possible with the version of System.Data.SqlClient in 4.8.0.

https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlauthenticationprovider.setprovider?view=netframework-4.8

But it seems it's only for managed identities in Azure. You can't seem to provide a connection string specifying "Authentication= Active Directory Interactive".

Just wondering if this is actually the case?

6
  • Please refer Authentication options Commented Aug 27, 2022 at 12:11
  • SQL Server can use either a SQL username/password or a windows credential. The windows credential is the "Integrated" option in @HarshithaV link. Authentication the client automatically send the windows credentials to the server when a request is send from client to server. The connection string will contain either Integrated or Trusted when windows credentials is used. So make sure you connection string does not contain a user and password. Commented Aug 27, 2022 at 14:47
  • So the connection string only has my email in and I'm specifying Interactive Authentication in the connection string. All I get back is this authentication type isn't supported. Looking online .NET 4.8.0 does support interactive authentication. Commented Aug 28, 2022 at 11:54
  • Please refer SO Thread Commented Aug 31, 2022 at 11:50
  • 1
    Thanks, ODBC works fine as the driver supports the interactive authentication. It looks like the only way to get ADO which uses Microsoft.Data.SqlClient to work with MFA is to use a managed identity in Azure so register your application in Azure. ODBC seems the way to go for any sort of MFA interaction with Azure SQL Servers. Commented Sep 1, 2022 at 6:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.