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
Aniketparab1234
Regular Visitor

Getting error 403 Forbidden: while using Default.UpdateDatasources API

I’m trying to use the Default.UpdateDatasources API, but I’m encountering a 404 Forbidden error.

After investigating, I understand that to resolve this issue, I need to grant the following application-level API permissions:

  1. Dataset.ReadWrite.All
  2. Workspace.ReadWrite.All

However, when I attempt to add these permissions under API permissions in Azure AD, they are not available under "Application permissions", only under Delegated permissions.

Only Tenant.Read.All and Tenant.ReadWrite.All only these 2 permissions are available under Application type permissions.

Please advise on how to enable or add these application permissions for my registered app, so I can successfully call the API.

1 ACCEPTED SOLUTION

Hi @Aniketparab1234,

 

Thank you for the response and confirming that the issue is resolved now. I request you to please accept the post as Accept as Solution so that other members who has similar issue will find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

View solution in original post

8 REPLIES 8
v-achippa
Community Support
Community Support

Hi @Aniketparab1234,

 

Thank you for reaching out to Microsoft Fabric Community.

 

The issue here is that only Tenant.Read.All permissions are visible under Application permissions and not the full set like Dataset.ReadWrite.All or Workspace.ReadWrite.All. Please follow below steps:

  • Ensure the application is registered in your home tenant, not as a guest user. App registrations made as guest may not expose the full set of API permissions.
  • Re add the Power BI API by searching for power bi service.
  • If the permissions still do not appear, ask your Azure Admin to manually assign Dataset.ReadWrite.All and Workspace.ReadWrite.All permissions to the app.
  • After permissions are added make sure to grant admin consent for the tenant.

Once this is done the service principal will have the correct access to call Default.UpdateDatasources.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

 

 

Thanks @v-achippa ,

 

You're right, those permissions might show up after these changes.

I was actually experimenting with some modifications to the body I was passing when calling the Update Dataset API. After adding a few additional inputs, the API call worked successfully and updated the datasource for that specific report.

Thank you for your suggestions!

Hi @Aniketparab1234,

 

Thank you for the response and confirming that the issue is resolved now. I request you to please accept the post as Accept as Solution so that other members who has similar issue will find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

grazitti_sapna
Super User
Super User

Hi @Aniketparab1234 

Resolution Steps:
1. Ensure the Correct API is Added
Power BI API permissions added under "Application permissions" should be granted.

2. Grant Admin Consent
After adding the required application permissions:

  • Click "Grant admin consent for <Your Tenant>" to approve them for your tenant.

This is mandatory for application permissions to take effect.

 

3.Use a Service Principal (not a user)
Make sure you're using a service principal and Service principal should be enabled in Power BI Admin Portal.

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Hi @grazitti_sapna 

 

Thank you for your feedback.

 

Actually,The tenant setting “Service principals can use Fabric APIs” has already been enabled from the PowerBI Admin portal.

 

And when I go to add permission under Application Type, it only shows Tenant permissions, not Report or Workspace permissions which are required to use update dataset API.

Aniketparab1234_0-1748008904659.png

 

Hi, I am also facing the same issue. Have you found any solution?

Yes. Permissions were correct.

I made changes in body. 
{
"updateDetails": [
{
"datasourceSelector": {
"datasourceType": "Oracle",
"connectionDetails": {
"server": "current server"
}
},
"gatewayId": "target gateway id",
"datasourceId": "target datasource ID",
"connectionDetails": {
"server": "target server"
}
}
]
}

Customize the body this way and try it

Akash_Varuna
Super User
Super User

Hi @Aniketparab1234  From my understanding, the 403 error occurs because Dataset.ReadWrite.All and Workspace.ReadWrite.All are only available as Delegated, not Application permissions. To fix this, use delegated permissions with a signed-in user or enable service principal access in Power BI Admin portal. Also, ensure the service principal is allowed and has proper roles.

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.