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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Korlay37
Frequent Visitor

REST API Bind Datasource in group not working

Hello,

 

I am trying to set up an imported report to refresh, in order to do that I have to bind it to one of my gateways. For that, I want to use the REST API: Datasets - Bind to Gateway in Group (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/bind-to-gateway-in-group)

 

For this I am using my dataset Id, my Gateway Id and the gateway's datasource id, I use the endpoint and I get a code 200 from the request from the API... however the Dataset gateway is not changing. The gateway it has does not even exist. That gateway was created by importing the report using the REST API but if I check its gateway I get a not found code.

 

5 REPLIES 5
Anonymous
Not applicable

Hi  @Korlay37 ,

 

As far as I know, the 403 error code is usually caused by insufficient permissions or being prohibited from the server for this requested operation, if your service principal already has sufficient permissions: Tenant.readwrite, then I think the only place to check and confirm is that you need to work with your tenant administrator to confirm the Admin in your Power BI tenant These two options in the portal allow the service principal to use the Power BI API are turned on:

vyangliumsft_0-1726018206262.png

Refer to:

Tenant settings index - Microsoft Fabric | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous 

 

Well the use of Fabric APIs is enabled, and I do not see how the create and use profiles would affect this issue...

Korlay37_0-1726081111927.png

 


But the real question here is why the REST API BIND TO GATEWAY IN GROUP returns a code 200 (ok) but it is not working? Is there a way to contact support?

If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

Anonymous
Not applicable

Hi  @Korlay37 ,

 

According to your API, this api is used to realize binds the specified dataset from the specified workspace to the specified gateway, conveniently you need to go to the corresponding workspace and click on Settings -> Find the corresponding dataset, and then come to the You need to go to the corresponding workspace and click Setup->Find the corresponding dataset, and then come to the UI interface of Power BI service to check whether you can find the corresponding gateway, and then make sure whether it has been bound successfully. If you are still not sure, you can consider using this rest api to try to find out whether the corresponding gateway already exists in the corresponding workspace, and if so, check to which dataset the gateway is bound.

Datasets - Discover Gateways In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @Anonymous ,

 

The reason I am using the api is that I do not want to go to the settings or setup in the UI interface of power bi. 

If I use Gateways - Get Gateways  I can see the gateway I want to bind my dataset to, but if I use Datasets - Discover Gateways in Group I get a "value": [ ] (no gateway to show) and if I use Datasets - Discover Gateways I get a code 403 Forbidden. This strange behaviour may have something to do with the Bind Gateway in group not working.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.