Blog Post

Azure SQL Blog
2 MIN READ

Windows Authentication for Azure AD principals for SQL Managed Instance is now Generally Available

sravani-saluru's avatar
Aug 17, 2022

We are happy to announce the General Availability of Windows Authentication for Azure AD principals for SQL Managed Instance. We released a public preview of this feature in April 2022, since then this feature has been improved and adopted by many customers across industries.

 

Modernize your security infrastructure with Azure AD and migrate your legacy applications which cannot use Azure AD authentication and must stick with windows authentication for connection. Windows Authentication for Azure AD principals removes the migration blocker and provides support for a broader range of customer applications. This feature enables customers to migrate their applications to SQL Managed Instance with minimal/no changes in the application stack. 

 

 

 

SQL Managed Instance is implemented with Azure Active Directory and Kerberos

 

Windows Authentication for Azure AD principals on managed instances is available for devices or virtual machines (VMs) joined to Active Directory (AD), Azure AD, or hybrid Azure AD. An Azure AD hybrid user whose user identity exists both in Azure AD and AD can access a managed instance in Azure using Azure AD Kerberos.

 

Enabling Windows Authentication for a managed instance doesn't require customers to deploy new on-premises infrastructure or manage the overhead of setting up Domain Services.

Windows Authentication for Azure AD principals on Azure SQL Managed Instance enables two key scenarios: migrating on-premises SQL Servers to Azure with minimal changes and modernizing security infrastructure.

 

Refer our documentation here:

 

Data exposed Video : https://learn.microsoft.com/en-us/shows/data-exposed/how-to-use-windows-auth-with-azure-sql-managed-instance-data-exposed 

 

Windows Authentication Overview: What is Windows Authentication for Azure Active Directory principals on Azure SQL Managed Instance? (Preview) - Azure SQL Managed Instance | Microsoft Docs

 

Setup with modern interactive flow: How to set up Windows authentication for Azure Active Directory with the modern interactive flow (Preview) - Azure SQL Managed Instance | Microsoft Docs

Setup Incoming trust : https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/winauth-azuread-setup-incoming-trust-based-flow?view=azuresql

 

Setup Managed Instance: https://docs.microsoft.com/en-us/azure/azure-sql/managed-instance/winauth-azuread-kerberos-managed-instance?view=azuresql

 

Podcast: EPISODE 54 - JUNE 14TH, 2022 - [AZURE SQL MI WINDOWS AUTHENTICATION]

Updated Oct 03, 2022
Version 4.0
  • Wyatt_Best's avatar
    Wyatt_Best
    Copper Contributor

    luistorres, that patch seems designed to resolve authentication errors; I am not nearly that far into the process. I can't figure out how to grant a local service account permission to delegate kerberos tickets to the Azure service principal. It's not that it doesn't work, it's that the Azure SP doesn't exist in my local AD.

     

    GarryBargsleyI didn't encounter that specific error, but I'd guess that your Windows login is failing to match against a login in SQL Server.  Assuming that you're trying to connect as a member of the Azure AD admin group/user, I'd try removing and re-adding the admin group/user from your Managed Instance.

  • GarryBargsley's avatar
    GarryBargsley
    Copper Contributor

    Wyatt_Best do you have any guidance on how you got Windows Auth to work?  We followed the directions but not getting it to work and very frustrated.

    MS Support has been no help either.

  • Wyatt_Best's avatar
    Wyatt_Best
    Copper Contributor

    We have successfully set up Windows Authentication with Azure SQL Managed Instance. Users are able to connect with SSMS or applications that use Windows auth.

     

    I'm now struggling to set up Kerberos delegation (double hop) for a linked server scenario. I want to link an on-prem SQL Server to Azure SQL MI. I know how to set up the Kerberos delegation in our local AD environment, but I can't figure out how to delegate to anything in Azure. There are no database.windows.net objects available in Active Directory Users and Computers.

     

    Any suggestions?

  • GarryBargsley's avatar
    GarryBargsley
    Copper Contributor

    What are the troubleshooting steps for getting this working?  I have worked with my Infrastructure team to perform the Incoming trust steps.  However, when I try to login to MI from SSMS I get the following:

     

    TITLE: Connect to Server
    ------------------------------
    
    Cannot connect to .database.windows.net.
    
    ------------------------------
    ADDITIONAL INFORMATION:
    
    Login failed for user '<token-identified principal>'. (Microsoft SQL Server, Error: 18456)
    
    For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error
    
    ------------------------------
    BUTTONS:
    
    OK
    ------------------------------

     

    I ran the klist command and show the following:

     

    #4>     Client: admin
            Server: krbtgt/KERBEROS.MICROSOFTONLINE.COM @ T.COM
            KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
            Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
            Start Time: 10/27/2022 16:58:07 (local)
            End Time:   10/28/2022 2:58:07 (local)
            Renew Time: 11/3/2022 14:14:33 (local)
            Session Key Type: AES-256-CTS-HMAC-SHA1-96
            Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
            Kdc Called: 01.t.com
    
    #5>     Client: admin
            Server: MSSQLSvc/a.database.windows.net:1433 @ KERBEROS.MICROSOFTONLINE.COM
            KerbTicket Encryption Type: Unknown (-1)
            Ticket Flags 0x40200000 -> forwardable pre_authent
            Start Time: 10/27/2022 16:55:56 (local)
            End Time:   10/27/2022 17:55:56 (local)
            Renew Time: 0
            Session Key Type: AES-256-CTS-HMAC-SHA1-96
            Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
            Kdc Called:

     

    I am not sure if KDC is being blocked by firewalls or not.

     

    NikoNeugebauer 

  • devakishore's avatar
    devakishore
    Copper Contributor

    I wonder the benefit of doing this since in terms of security this might cause some new vulnerabilities if the windows credentials does not follow the principal of least access privileges.