Partager via


Token-based authentication support for Azure SQL DB using Azure AD auth

SQL Server security team would like to announce token based authentication support for Azure SQL DB V12 authentication using Azure Active Directory (AD). Currently we support two authentication methods: Azure AD user/password and Azure AD integrated authentication supporting Windows credentials ( see https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/ ). The new token-based authentication method allows middle-tier services to obtain a token from Azure AD and use it to connect to Azure SQL Database. It enables more sophisticated scenarios, including certificate-based authentication. For more details, see below the attached Readme document and the zip file that contains a simple code example connecting to Azure SQL DB using token based authentication. It requires Visual Studio 2015 with .NET 4.6 (or higher) and ADALSQL.dll (see also the client setup requirement in the main MSDN document for Azure AD authentication indicted above). For further questions on this topic please contact SQLAzureADAuth@microsoft.com alias.

TokenReadme.zip

Comments

  • Anonymous
    May 03, 2016
    Any change of getting the sourcecode on github filed under the rest of the Azure-Samples?The zip will do for now, thanks.
    • Anonymous
      May 29, 2019
      It is on the to do list
  • Anonymous
    June 27, 2016
    The comment has been removed
    • Anonymous
      February 20, 2017
      @AK On the offchance you're still stuck with this: we found that we needed to explicitly grant our application access to the DB through it's own account. It wasn't possible to take advantage of any group memberships
      • Anonymous
        May 29, 2019
        You have to explicitly create a user in the database for the app
    • Anonymous
      April 13, 2017
      I'm getting the same error when I connect in my C# test program. Did you happen to find out the reason?
      • Anonymous
        April 28, 2017
        Please try the new version see
        • Anonymous
          November 27, 2017
          Hello, I am facing the same issue now.. Can you please help me on how this issue was resolved?
          • Anonymous
            May 29, 2019
            Unfortunately, for now we only have the Windows version available. In the future we may create a version available for other platforms
    • Anonymous
      April 20, 2017
      Hi,I'm getting the same error when I try to authenticate with an AD token. Did you resolve this issue?
      • Anonymous
        April 28, 2017
        Please try to use the new version see
      • Anonymous
        May 29, 2019
        One immediate issue to check is the following. To register the certificate with Azure AD you have to be the AAD admin.If you follow the exact description and the code in this blog and still see the same problem, please contact MS support and open a support ticket.
    • Anonymous
      May 29, 2019
      One immediate issue to check is the following. To register the certificate with Azure AD you have to be the AAD admin.If you follow the exact description and the code in this blog and still see the same problem, please contact MS support and open a support ticket.
  • Anonymous
    March 26, 2017
    Will token based authentication be coming to the non-PaaS versions of SQL 2016?
    • Anonymous
      May 29, 2019
      For now this is not on our roadmap
  • Anonymous
    April 06, 2017
    "Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON" happened in connecting to Azure SQL DB using AD Token access
    • Anonymous
      May 29, 2019
      One immediate issue to check is the following. To register the certificate with Azure AD you have to be the AAD admin.If you follow the exact description and the code in this blog and still see the same problem, please contact MS support and open a support ticket.
  • Anonymous
    June 21, 2017
    Hi,I have followed this one and i was able to access my db from my deployed service.How can i use AAD authentication with entity framework?
  • Anonymous
    November 06, 2017
    I get the exception when opening the connection saying “Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON”.
    • Anonymous
      May 29, 2019
      One immediate issue to check is the following. To register the certificate with Azure AD you have to be the AAD admin.If you follow the exact description and the code in this blog and still see the same problem, please contact MS support and open a support ticket.
  • Anonymous
    November 15, 2018
    HelloThis is all very windows orientedWhat if i have to access my Azure SQL from non-windows machine?
    • Anonymous
      May 29, 2019
      Unfortunately, for now we only have the Windows version available. In the future we may create a version available for other platforms