Forum Discussion

Pablo82's avatar
Pablo82
Regular Visitor
5 months ago
Solved

Connecting between Fabric SQL Database and Azure Function App

Hello

 

I currently have a setup of a couple functions residing in an Azure Function App that I would like to write data to a SQL Database within Fabric. I have added the SQL Database as a Service Connector within the Function App and when I try to validate the connection, it shows as succesful, however when I try to write data within my function, it seems to always reject my connection. I am currently using the connectionstring provided by the Service Connector in the environment variables of the Function App, but am unsure what I might be forgetting or why the connections keep being rejected. The specific error is 'HYT00 Login Timeout expired.'

 

I should also note that the Function App is connected to a VNet due to other necessities and uses a Managed Identity for most connections. The functions themselves use the ODBC 18 Driver to setup the connections as well. Am I forgetting something important or what could be the cause of Fabric rejecting my connection attempts?

 

Thanks in advance!

7 Replies

  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi Pablo82 
    Thanks for reaching out to Microsoft Fabric Community Forum.

    The 'HYT00 Login Timeout expired.' error usually indicates a network connectivity issue rather than a problem with the connection string or code.

     

    Since your Function App is integrated with a VNet, please verify the following:

     

    • Ensure the managed private endpoint created by the Service Connector is approved in the Fabric workspace (Workspace -> Networking - Managed private endpoints).
    • Confirm that any NSG or firewall rules allow outbound traffic on TCP port 1433 to the Fabric SQL endpoint.
    • If you are using Managed Identity authentication, make sure the Function App’s identity has been granted access to the Fabric SQL database. You can do this from the Fabric portal by sharing the database with the identity and assigning an appropriate role.

    Reference :
     Integrate SQL database in Microsoft Fabric with Service Connector | Microsoft Learn
    Connect to Your SQL Database - Microsoft Fabric | Microsoft Learn
    Authentication in SQL database - Microsoft Fabric | Microsoft Learn

    Hope this helps!!
    Thank You.

    • Pablo82's avatar
      Pablo82
      Regular Visitor

      Hello and thank you for the help so far!

       

      I've gone through your recommendations and can confirm that #3 Managed identity access to Fabric SQL Database is correctly configured. I'm not fully sure what is meant at #1 with the managed private endpoint? I currently only see a connecting string in the environment variables which I assume was generated once I setup the database within the service connector. As for #2 I will check with another department for any other authentication limitations in force for the function apps.

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi  

        Thanks for checking on the Managed Identity configuration, that’s helpful.

        For the networking part, the managed private endpoint refers to a private connectivity setup between your VNet integrated Function App and the Fabric SQL endpoint. If this isn’t configured or approved, the connection may time out (HYT00 Login Timeout expired).

        Regarding the NSG / firewall validation with your internal team, could you please share an estimated timeline for when you expect to have an update on this?

         

  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi Pablo82 

    We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.

  • Hi Pablo82 ,

     

    it is possible that you share your Azure Function Code?

    I will test your problem. 

     

    Best regards

     

    Feel free to leave kudos or accept it as a solution. This will also help other community members.