MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.3k stars 21.48k forks source link

Obsolete overcomplicated instructions #106256

Closed jan-hudec closed 1 year ago

jan-hudec commented 1 year ago

The SqlClient has had support to call the DefaultAzureCredential itself for a while now. All that's needed now is (besides enabling the managed identity and granting it permissions) is to change the connection string per https://learn.microsoft.com/en-us/sql/connect/ado-net/sql/azure-active-directory-authentication?view=azuresqldb-current

Please, update the instructions to the simpler approach.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

RamanathanChinnappan-MSFT commented 1 year ago

@jan-hudec

Thanks for your feedback! We will investigate and update as appropriate.

RyanHill-MSFT commented 1 year ago

Hi @jan-hudec, and thanks for your feedback. Using just the connection string is dependent on the version of SqlClient one uses. While Azure SQL does mention a newer way of connecting, the intent of this doc is to broadly illustrate how to utilize a managed identity for connecting to an Azure SQL instance.

Nonetheless, I've assigned this to the content author for further investigation and to update the doc as appropriate.

cephalin commented 1 year ago

@jan-hudec The Entity Framework team confirmed that EF6 currently only supports System.Data.SqlClient and not Microsoft.Data.SqlClient. The content in the doc is still current.

please-close