Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi ,
We are trying to connect to Fabric Lakehouse using the SQL Endpoint through a C++ code which uses MSAL libraries and Oauth. We are able to connect to SQL Database in same Fabric workspace using the same code flow but getting connection error for Lakehouse.
We checked the Network packets in Failure scenario and doent see any packets showing error. can someone suggest the way to handle this scenario? is there any extra information/flag/parameter that needs to be sent in case of Lakehouse?
Solved! Go to Solution.
Hi @Pratik_0527,
The issue you're experiencing with the SQL endpoint routing behavior is quite complex. I suggest raising a support ticket so that a Microsoft engineer can investigate and address it directly.
Here is the link to raise the support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you
Hi All, 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
Hi All, 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
Hi @Pratik_0527,
Thank you for reaching out to the Microsoft Fabric Forum Community.
SQL analytics endpoint supports read-only operations. If your workflow includes write operations, this might be causing the error.
Additionally, SQL endpoint only supports user identity and does not support service principal and managed identity
Ref: Items - List SQL Endpoints - REST API (SQLEndpoint) | Microsoft Learn
Whereas SQL database supports both user and service principal identities
This can also be the root cause of the error you are facing.
Ref: Items - Get SQL Database - REST API (SQLDatabase) | Microsoft Learn
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi,
Thanks for the reply and information. Adding to above. Our code connects successfully to Fabric SQL database with similar SQL end point. Also the same end point works with Microsoft SQL server Native driver and SSMS tool.
One thing we observed during our debug the SQL endpoint is routing connection to a different end point as below. Can you please guide us if in this case any extra handeling is needed.
Redirect URL : pbipneu9-northeurope.pbidedicated.windows.net\NKTTUL5IRFUEJGEUFNEEFOKTJM-CCSJOZJPH6FE5GFNZMCN4ILWLA-dw
Also pbipneu9-northeurope.pbidedicated.windows.net return "20.38.86.127" when pinged. but the complete URL is not pingable.
Let us know if you can provide any help in this area. Thannks 🙂
Hi @Pratik_0527,
Could you please confirm if the issue was resolved after raising a support case? If so, we’d appreciate it if you could share the solution to help others in the community. As we haven’t heard back, we’re closing this thread. For any further issues, please raise a new thread in the Microsoft Fabric Community Forum we’ll be happy to assist.
Thank you for being part of the Microsoft Fabric Community.
Hi @v-saisrao-msft we have raised the support ticket but havent heard anything.
Hi @Pratik_0527,
We appreciate your patience and thank you for the update on the issue. A dedicated support team will be assigned to handle the break-fix scenarios efficiently. Please wait until the issue is resolved. Once resolved, kindly share the insights.
Thank you.
Hi,
We have received response from the Fabric support team and currently they are looking into it. Ill update with the findings and solution once the issue is resolved. Meanwhile any pointers or solutions/recommendations are apreciated
Hi @Pratik_0527,
The issue you're experiencing with the SQL endpoint routing behavior is quite complex. I suggest raising a support ticket so that a Microsoft engineer can investigate and address it directly.
Here is the link to raise the support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you
We have raised the support ticket and currently working with the team on the issue,
Thanks
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
1 |