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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Mattdjuk
New Member

403 on Api call

Hi

 

I keep getting the following when I call the https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/tables

 

 

 

Error obtaining tables: StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  Access-Control-Expose-Headers: RequestId
  RequestId: ed07e6ec-e517-42c6-b6a6-03d55e1ccc15
  Date: Mon, 17 Apr 2023 13:51:28 GMT
  Content-Length: 51
  Content-Type: application/json; charset=utf-8
}

 

 

 

 

I am generating a token based on my web api app in Azure being registered and having given it all the permissions that seem relevant. 

 

Mattdjuk_0-1681739731538.png

 

Any advice? I'm going spare trying to get this API to work - basically, I am trying to empty my dataset so I can reinsert my data again. Nothing I can do will make it get beyond the 403 error.

 

4 REPLIES 4
GuillermoAM
Frequent Visitor

Hi,
Not sure if you have fixed the error but for me it happened the same and the solution was very simple.
just go to the processor settings and unselect the Asynchonous Pattern and that's all.

GuillermoAM_0-1699452783091.png

 

v-rzhou-msft
Community Support
Community Support

Hi @Mattdjuk ,

 

To enable your Azure AD app access objects such as reports, dashboards and datasets in the Power BI service, add the service principal or master user, as a member or admin to your workspace.

For reference: Enable workspace access

You may refer to your below offical blogs to learn more details about how to register an APP or Service Principal.

For reference:

Set up Power BI Embedded

Embed Power BI content with service principal and an application secret

 

Best Regards,
Rico Zhou

 

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

 

I've tried this, it makes no difference - the result is the same

 

Error obtaining tables: StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  Access-Control-Expose-Headers: RequestId
  request-redirected: true
  home-cluster-uri: https://wabi-uk-south-redirect.analysis.windows.net/
  RequestId: d2f2de1b-9ca9-4c1f-9a5f-5932db9148b5
  Date: Wed, 19 Apr 2023 07:50:02 GMT
  Content-Length: 51
  Content-Type: application/json; charset=utf-8
}

I also came across the error 403 frequently while first testing the API. I appeared I missed a few configuration items.

I summarized it in this document Use Power BI APIs from Azure Data Factory - Mattias De Smet

If it still doesn't work, you can provide your basic calls (which url, which method, which headers, etc...)? I noticed sometimes people use app.powerbi.com , which results in 403 because it has to be api.powerbi.com

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.