none
can I use MSI to connect Azure SQL with .NET framework RRS feed

  • Question

  • According to official document (https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi), we just can use sdk to connect Azure SQL with MSI in the .Net Framework 4.7.2 application. Now I want to connect Azure SQL with MSI the .Net Framework 4.6.1 application.

    According to my research, we can use user the rest api (https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity#using-the-rest-protocol) to get access token with MSI.

    Can I use the way to implement my need?


    Sunday, September 22, 2019 1:59 PM

All replies

  • Hi Test190922,

    In .NET 4.7.2 the necessary libraries have been merged into the .NET Framework but pre .NET Framework 4.7, there was an additional library that was required to make this work. 

    Microsoft Active Directory Authentication Library for Microsoft SQL Server (link)

    If the version of the .NET Framework you are using does not include the adalsql library, you will need to download and install this library seperatly.

    Regards,

    Mike

    Tuesday, September 24, 2019 3:09 AM
    Moderator
  • Hi. Do you mean that if I manually install sdk, I also can connect Azure SQL with MSI in the .Net Framework 4.6.1 application? If so, could you tell me which sdks I need?
    Thursday, October 10, 2019 2:06 AM
  • Hi Test190922,

    On all client machines, from which your applications or users connect to Azure SQL Database using Azure Active Directory, you will need the ADAL library that Mike has pointed to.

    However, if your client machines are already running on 4.7.2, there are no dependencies to install.

    Thursday, October 10, 2019 3:52 AM
    Moderator