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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Amar-Agnihotri
Resolver I
Resolver I

Access to the resource is forbidden error while accessing Power Bi Datasets using API

Hi,

I am creating user Activity  panel and want to use following API to get worklspaces, datasets, dataflows etc --

 


https://api.powerbi.com/v1.0/myorg/admin/groups?$top=20

https://api.powerbi.com/v1.0/myorg/admin/datasets

 

I am getting below error-

 

AmarAgnihotri_0-1641983123902.png

When i try to edit the data source setting and want to try login using organizational account it shows  -

 

AmarAgnihotri_1-1641983220043.png

I am having Power BI admin controls but not able to understand why it is happening. Please help me. 

 

Source for the API is microsoft

AmarAgnihotri_2-1641983358883.png

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Amar-Agnihotri
Resolver I
Resolver I

Hi,

Please follow this link for step by step process of Application Registration in Azure and for all the required admin permissions -

 

https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/

 

View solution in original post

13 REPLIES 13
Syndicate_Admin
Administrator
Administrator

is this problem resolved? I am stuck with the same problem and not able to fetch the data from toggl through API. Can anyone help please?

Amar-Agnihotri
Resolver I
Resolver I

Hi,

Please follow this link for step by step process of Application Registration in Azure and for all the required admin permissions -

 

https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/

 

Greetings, Do you resolve the problem?

I am stuck with the same problem."

 

 

@avillarroelk250 

Please follow thge steps in this link

https://www.sqlshack.com/how-to-access-power-bi-rest-apis-programmatically/


It was resolved for me 

AnkitKukreja
Super User
Super User

Please remove the word bearer from the Authorization and it should work.

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Tried this also 

AmarAgnihotri_0-1642081346989.png

Getting the same error 

AmarAgnihotri_1-1642081375562.png

 

Hi!
Then I think you should raise a ticket to MS support.

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Can you please tell where can i log this ticket. Also please tell me the various permissions in O365 tenant which i need to access this . I have already POwer BI admin access but not sure about my permisiions in O365

Hi! @Amar-Agnihotri 

 

Not much idea about 365 access. Can you check if you have an Azure subscription on your Admin account? If yes, then I believe it should have worked.

 

AnkitKukreja_0-1642440833167.png

 

 

https://powerbi.microsoft.com/en-us/support/

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Thanks will check this 

AnkitKukreja
Super User
Super User

Hi! @Amar-Agnihotri 

 

Please try using Basic authentication and try.

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hi @AnkitKukreja ,

Thanks for the reply. I tried basic authentication 

AmarAgnihotri_0-1642053120603.png

got the same error again

 

AmarAgnihotri_1-1642053147952.png

Niow i tried advanced authentication 

and passed the authorization token as given in microsoft

AmarAgnihotri_2-1642053333261.pngAmarAgnihotri_3-1642053353505.png

got this error 

AmarAgnihotri_4-1642053406709.png

Now what to do ?

Hi,

 

Was this resolved. I am in the same place now.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.