Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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

Reply
Pratik_0527
Regular Visitor

Lakehouse Connection issue using SQL Endpoint

Hi All,

 

Im trying to connect to Fabric Lakehouse through a C++ using the SQL Endpoint. I have registered the APP in Azzure and generated a client ID. Using this to connect im getting below error. Can somebody guide what needs to be done here? Are we missing anything ?

Error Message : "Error details: error invalid_client error_description: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Resource value from request: https://pbipneu9-northeurope.pbidedicated.windows.net. Resource app ID: cb4dc29f-0bf4-402a-8b30-7511498ed654. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000."

9 REPLIES 9
v-nmadadi-msft
Community Support
Community Support

Hi @Pratik_0527 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

Hi,

Its not resolved yet

v-nmadadi-msft
Community Support
Community Support

Hi @Pratik_0527  ,
Thanks for reaching out to the Microsoft fabric community forum.

Check these troubleshooting steps:

-> Please ensure that the caller has contributor or higher workspace role.

-> The required delegated scope to call lakehouse are Lakehouse.ReadWrite.All or item.ReadWrite.All, ensure                 these are in place.

->  Since you're calling from a C++ app make sure you're using the correct token endpoint.
       For Ex if it is to get lakehouse it should be something like this
       GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId}


If this post helps, then please consider Accepting as solution to help the other members find it more quickly and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you

Hi @v-nmadadi-msft We have verified the enpoint that we are using with the help of Native driver by microsoft and the SSMS tool. Both are able to connect to the Lakehouse. 
Also we are not using CURL as the "GET" request suggested by you shows something like CURL API.
Let us know if Lakehouse connectivity requires CURL API calls?

Hi @Pratik_0527 ,

If you are trying to connect to SQL endpoint using a C++ app,
you have to use REST API and the supported features for it are 

vnmadadimsft_0-1749811333851.png

Items - REST API (SQLEndpoint) | Microsoft Learn

whereas for lakehouse these are the supported features

vnmadadimsft_1-1749811697872.png


Items - REST API (Lakehouse) | Microsoft Learn


If this post helps, then please consider Accepting as solution to help the other members find it more quickly and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you



Hi,

 

Thanks for the revert, Let us take a look at this REST API usage and feasibility in our code setup. We will surely try it and update with our findings.

Hi @Pratik_0527 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

nilendraFabric
Community Champion
Community Champion

Hi @Pratik_0527 

 

have you done this?

 

Navigate to your app registration in the Azure Portal.
2. Under API permissions, click + Add a permission → Microsoft APIs → Power BI Service.
3. Select delegated or application permissions (e.g., `Dataset.ReadWrite.All` or `Reports.Read.All`, depending on your use case).
4. Click Add permissions and have an admin grant tenant-wide consent

Hi @nilendraFabric we do have this permission setup present in Azzure. Also we are not using Power BI. its a C++ driver code.

Helpful resources

Announcements
May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.