Connect PowerShell to Azure SQL PaaS using Azure AD Integrated authentication ?

MS Techie 2,316 Reputation points
2021-05-03T14:38:48.803+00:00

Can we connect PowerShell to Azure SQL PaaS using Azure AD Integrated authentication ?

From my SQL Mgmt Studio, i can connect using Azure AD Integrated Authentication. So can i connect using PowerShell ? Do i need Azure CLI . Any article or link would be helpful.

Azure SQL Database
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,630 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 9,641 Reputation points Microsoft Employee
    2021-05-04T23:04:37.937+00:00

    Hello @MS Techie Thanks for being patient while checking on this. Another way of doing it using PowerShell is shared in this document.

    Example 11 in the above document is suitable for interactive login
    Example 12 is for SPN usage
    Example 13 is for Managed Identity usage

    Please do let us know if you have further query. Thanks