403 error thrown by power bi report server when trying to get list of data sets

+1 vote
Oct 29, 2018 in Power BI by saranya
• 130 points
238 views
Hey @saranya, what exactly did the error log say?

i am sending a GET request to:

https://api.powerbi.com/v1.0/myorg/datasets
with headers:
Content-Type: application/json
authorization : Bearerxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Response headers:
server:Microsoft-HTTPAPI/2.0
strict-transport-security:max-age=31536000; includeSubDomains
x-frame-options:denyx-content-type-options:nosniff
requestid:174e9027-8d2f-4f98-8085-d2f9f75087a5date:Mon, 29 Oct 2018 07:21:31 GMT
Request headers:
content-type:application/json

Why am i not able to access datasets ? am i missing any settings?

Hey @saranya, Try removing the header and footer, sometimes these interfere with column space and create confusion. A lot of people have this same error due to lot of different reasons. Its basically a data integration error.

i am sending request through RESTAPI, url would be: 

https://api.powerbi.com/v1.0/myorg/datasets
headers: 
Authorization Bearer xxxxxxxxxxxxxxxx
content-type:application/json
accept: application/json

still i am getting 403 error. Are there any settings to be changed in power bi report server?

Hi @saranya, I've found this helpful. Even i've had a similar problem, I had followed the guidelines from this and applied it accordingly for my case. Hope it helps. 

2 answers to this question.

+1 vote
Hey @saranya, Try removing the header and footer, sometimes these interfere with column space and create confusion. A lot of people have this same error due to lot of different reasons. Its basically a data integration error.
answered Oct 29, 2018 by Kalgi
• 45,780 points

do you mean remove (content-type:application/json) how can i pass access token?

You can do something like this:

1.  Call login API to get the access token.

2.  Use access token call other operation api.

Example:

    WebResponse = Web.Contents(WebServiceURI,
        [Content = Text.ToBinary(WebServiceContent),
         Headers = [Authorization="Bearer " & AccessToken,
                    #"Content-Type"="application/json",
                    Accept="application/json"],
         Timeout = WebTimeout])

In addition, API can allow "username", "password", "token" as the parameters

0 votes
403 is usually server rejection
That is it acknowledges the request but doesn't process.
The problem seems to be that you don't have permission to the database you're trying to access
The problem could be in 2 places, first is while the data was brought on the power bi cloud or if this is an azure correction used then you just do not have the privileges.
answered Oct 31, 2018 by Maverick
• 10,040 points

I have granted permissions for the application i have registered

Related Questions In Power BI

0 votes
1 answer

Error:connecting to Azure SSAS server in Power-BI through Import mode

If I understand correctly, you're connecting to ...READ MORE

answered Nov 9, 2018 in Power BI by Upasana
• 8,550 points
370 views
0 votes
1 answer

Can I get rid of the grey border on the report visuals with power bi embedded?

You can do the following to make the ...READ MORE

answered Apr 10 in Power BI by Shubham
• 13,350 points
382 views
+1 vote
1 answer

Is there a way to convert JSON data to readable table in power bi

Follow these steps step 1 - Click on ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 17,060 points
3,100 views
0 votes
1 answer

How to publish .pbix report from power bi desktop to power bi service directly?

To save powerbi file directly to report ...READ MORE

answered Sep 27, 2018 in Power BI by Kalgi
• 45,780 points
318 views
0 votes
1 answer

How to add an image to power bi report – power bi web

There are visuals (e.g. table) that can ...READ MORE

answered Sep 27, 2018 in Power BI by Kalgi
• 45,780 points
49 views
0 votes
1 answer

Are 2 MM rows too much data for Power BI Online to manage?

PowerBI can easily handle 400MM rows and ...READ MORE

answered Sep 28, 2018 in Power BI by Kalgi
• 45,780 points
64 views
0 votes
1 answer

Switch Power BI data sources from Excel to Azure analysis services

One option that you should consider would ...READ MORE

answered Sep 28, 2018 in Power BI by Kalgi
• 45,780 points
67 views
0 votes
1 answer

what is power BI report server

Power BI Report Server is an on-premises ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 17,060 points
47 views
+2 votes
2 answers

Power BI service throwing 403 error when using token to embed Power BI report

To add to @Kalgi's answer, Also make ...READ MORE

answered Oct 3, 2018 in Power BI by Nilesh
• 6,920 points
814 views
0 votes
3 answers

How do I get token using javascript API while trying to embed graphs using Power BI

Use ADAL.js that will give you an ...READ MORE

answered Jun 22 in Power BI by anonymous
825 views