sql-serverazure-active-directoryazure-sql-databaseadsi

Is it possible to query the Active Directory from Azure SQL


I am migrating from an older version of Microsoft SQL to Azure SQL. The existing SQL Server stored procedures use OPENQUERY and a linked ADSI server to retrieve user information directly from the Active Directory.

Is this possible in Azure SQL?


Solution

  • Azure SQL Database only allows to query another Azure SQL Database (remote) or Azure Synapse Analytics databases using elastic queries. All other SQL and non-SQL sources are not allowed.

    Azure Managed Instance uses a private VNET and supports linked servers to a limited number of targets. Supported targets: SQL Server and SQL Database. Not supported targets: Active Directory, files, Excel, Oracle, MySQL, Analysis Services, and other RDBMS.

    Azure SQL Database would have no way to communicate with your on-premises servers since it does not uses private VNETs as Managed Instance does.

    If you rely heavily on this you should discard all Azure SQL (PaaS) options and go for a SQL Server Azure VM.