Azure Automation | update workers to at least .NET Framework 4.6 (for Azure AD connection support to SQL)
Currently, Azure Automation Account doesn't support connecting to SQL using Azure AD
For example:
connectionString = "Server=$server;Database=$database;User ID=$adminName;Password=$adminPassword;authentication=Active Directory Password;"
This will return an error when executed via Azure Automation "Keyword not supported: 'authentication'.""
The reason seems to be that the Automation workers still use .NET Framework 4.5, and we need at least 4,6 to have Azure AD support to SQL.
There are more people running into this issue, please also see: https://stackoverflow.com/questions/45091135/active-directory-password-connection-azure-sql-failure-from-azure-automation/45093784
Thank you and kind regards

3 comments
-
Larry Silverman commented
Weirdest thing happened yesterday, 1/1/2018. We had been using SQL connection string parameters ConnectRetryCount and ConnectRetryInterval for some months in Azure Automation. Then at 5 PM, all our runbooks started failing. We traced it to the fact that those connection string params were only added in 4.5.1. We can only surmise that some execution environments are >4.5 and some are not, and there's no predicting what you're going to get. Also, determining the current .NET framework execution environment is unnecessarily complex.
-
Tim commented
I received an answer from Microsoft on this topic:
"...given that the Azure Automation sandboxes currently run .NET Framework 4.5. However we are working on updating our sandboxes to support .NET 4.6 in the very near future (Feb/Mar 2018)..."
"I agree that’s not easy to find this information on the official documentation, so I’ll ask the documentation team to make this more clear now, once we start to support .NET 4.6." -
Tim commented
Is there any place where i can find the currently used .NET version in azure automation?