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
1,345 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
• 52,370 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,840 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,620 points
1,265 views
0 votes
2 answers

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

It's just a simple css code to ...READ MORE

answered Apr 18, 2020 in Power BI by Prateek Mehta
2,335 views
0 votes
1 answer

By default, which level of filter behaves as same as a slicer in a report in Power BI desktop?

Hey, There are several types of filters in ...READ MORE

answered Jan 31, 2020 in Power BI by Rakesh
2,481 views
0 votes
1 answer

How to create a new dashboard by pinning visualizations from a report in Power BI?

Hey, I can show some steps wise steps ...READ MORE

answered Feb 6, 2020 in Power BI by Gitika
• 65,930 points
260 views
0 votes
0 answers

How to create a new slicer to filter data by district manager in Power BI?

Can anyone create a new slicer to ...READ MORE

Feb 6, 2020 in Power BI by Roshni
• 10,480 points
392 views
0 votes
1 answer

Error Error on Data load when open report in server "An error has occurred"

The problem you can solve by edit this ...READ MORE

answered Nov 15, 2020 in Power BI by Gitika
• 65,930 points
100 views
0 votes
1 answer

How to connect webpage data by using Power BI Desktop?

Web connections are only established using basic ...READ MORE

answered Nov 18, 2020 in Power BI by Gitika
• 65,930 points
134 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
• 18,570 points
10,713 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
• 7,020 points
2,766 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, 2019 in Power BI by anonymous
2,522 views