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
788 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
• 51,970 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,820 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
933 views
0 votes
2 answers
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 in Power BI by Rakesh
1,578 views
0 votes
1 answer
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 in Power BI by Roshni
• 6,190 points
294 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 in Power BI by Gitika
• 51,280 points
16 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 in Power BI by Gitika
• 51,280 points
13 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,410 points
8,983 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,980 points
2,111 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,088 views