Connecting to Azure SQL using Active Directory Password authentication RRS feed

  • Question

  • I am able to connect to a properly configured Azure SQL database using Active Directory Password Authentication from my local computer with the following powershell script :

    $ConnectionString = "Data Source=$($dbServerName).database.windows.net;Authentication=Active Directory Password;$($dbUsername); PWD=$($dbPassword)";
    $conn = new-object System.Data.SqlClient.SqlConnection($connectionString);

    However, running the equivalent powershell script via Azure Automation fails because it does not recognize the 'Authentication' key word of the connection string.  I believe this is because the Azure Automation environment does not contain the required Azure Active Directory Authentication Library for SQL Server (ADALSQL.DLL).  Is there a workaround for this because I need this to work, or do you plan to integrate this into Azure Automation once SQL Server 2016 is officially released.


    Tuesday, May 17, 2016 4:40 PM

All replies

  • I am running into the same problem.  Any luck finding a solution?
    Friday, October 7, 2016 4:40 AM