Microsoft SQL Data Sync 2.0 using AAD authentication

MTBmojave80 40 Reputation points
2023-05-22T18:04:03.1233333+00:00
I would like to configure Microsoft SQL Data Sync 2.0 (latest version) to authenticate using Azure Active Directory.

I have successfully created a user and given them ownership of the SQL database, but the account still cannot connect. The Data Sync DOES connect when using the SQL Server Management or the Azure Data Studio, so this rules out any firewall issues.

The error message is:

     Connection failed = login failed for user
     Please check database credentials
     Other reasons for failure:
     Firewall settings of Local Machine block the connection to Sync Metadata Database.
     Firewall settings of Sync Metadata Database block the connection.

The user can connect to the SQL database if I provide a local account to SQL but not AAD. So, it seems they have proper rights to access the SQL database and I have checked the properties for both local SQL and AAD accounts and settings are identical.
Azure SQL Database
Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

Accepted answer
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2023-05-22T19:57:53.52+00:00

    Azure SQL Data Sync does not support Azure Active Directory authentication. It only supports SQL authentication to connect to Azure SQL.

    When you install the SQL Data Sync agent you can connect to the local SQL Server instance (on-premise) with a local Windows user or a SQL login.

    To demonstrate that SQL Data Sync does not support AAD authentication, you can read here that Azure SQL Databases that were created to support only Azure ADD are not supported by Azure SQL Data Sync.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. MTBmojave80 40 Reputation points
    2023-05-22T20:33:47.2566667+00:00

    Per Alberto Morillo, the SQL Data Sync is not a supported feature for Azure AD SQL database authentication. It is a imitated functionality only to support local SQL accounts.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.