Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Functions Managed Identity: Keyword not supported: 'authentication' #32

Open
Szeraax opened this issue Apr 3, 2023 · 0 comments

Comments

@Szeraax
Copy link

Szeraax commented Apr 3, 2023

When using a AZ Function MI, you need to use a connection string like: Server=a.database.windows.net; Authentication=Active Directory Managed Identity; Database=a but I get the error from AZ: Keyword not supported: 'authentication'.

Supposedly the fix is to use Microsoft.Data.SqlClient instead of System.Data.SqlClient. https://gist.github.com/MartinHBA/86c6014175758a07b09fa7bb76ba8e27

Perhaps Invoke-SqlCmd2 should detect if it has the Authentcation in the connection string and use MS.Data.Sql instead? Dunno.

More info: https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/

Shame that for lightweight query access, I have to revert to users and password. Or use dbatools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant