Forum Discussion

Pratik_0527's avatar
Pratik_0527
Helper I
1 year ago
Solved

Fabric Lakehouse connection Getting Rerouted

Hi All,   We are trying to connect to Fabric lakehouse using SQL Endpoint with Oauth and MSAL. We are sending the Fedauth for connection but in the respose we are receiving the ENVCHANGE  and our c...
  • Pratik_0527's avatar
    Pratik_0527
    1 year ago

    Hi v-prasare , We found the solution for the issue. For lakehouse, the connection gets rerouted to some different URL. Initially we were tokenizing it and trying to connect to it, but the trick is you need to perform socket , prelogin on the original end point and "send the redirected URL to the login stage" while using the TDS protocol. PFB sample :
    original Sql end point : nkttul5irfuejgeufneefoktjm-obtyxdfizvlura7ao2yincxurq.datawarehouse.fabric.microsoft.com

    Redircted URL : pbipneu9-northeurope.pbidedicated.windows.net\ABCDUL5IRFUEJGEUFNEEFOKTJM-CCSJOZJPH6FE5GFNZMCN4ILWLA-dw:1433

    Existing code logic trying to connect : pbipneu9-northeurope.pbidedicated.windows.net