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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
KarthikrajH01
New Member

Datasets - Update Parameter Rest API in PowerBi throws 403 using Service Principal

The Power BI REST APIs Get Refresh and Get Parameters operations work fine using a Service Principal. However, I'm encountering issues when updating parameters using a Service Principal, despite adding the necessary permissions/scopes to the App Registration (Dataset.Read.All and Dataset.ReadWrite.All).

Permission.png

I need to update parameters using the Service Principal, but I'm getting 403 exceptions with the details below, and I'm unsure which permission I might be missing:

 

  "Operation returned an invalid status code 'Forbidden'\n\n   at Microsoft.PowerBI.Api.DatasetsOperations.UpdateParametersInGroupWithHttpMessagesAsync(Guid groupId, String datasetId, UpdateMashupParametersRequest updateMashupParametersRequest, Dictionary`2 customHeaders, CancellationToken cancellationToken)\n   at Microsoft.PowerBI.Api.DatasetsOperationsExtensions.UpdateParametersAsync(IDatasetsOperations operations, Guid groupId, String datasetId, UpdateMashupParametersRequest updateMashupParametersRequest, CancellationToken cancellationToken)\n"

 

 

Does anyone know how I can resolve this?

 

Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @KarthikrajH01 ,

 

Based on my research and understanding, 403-related error codes are usually associated with insufficient permissions or disabled admin settings. Could you please explain how the AAD token is generated? If it is generated by an AAD user, only dataset owner permissions should be required. However, if it is called by a service principal profile, more settings and permissions might be needed, and some admin settings may need to be enabled. You can refer to this document for more details:

Embed Power BI content in an embedded analytics application with service principal and an applicatio...

 

You can check the official documentation for a description of the 403 error message:

Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn

 

This is the related document, you can view this content:

Solved: Power BI REST API gives 403 forbidden (use service... - Microsoft Fabric Community

Solved: Government API 403 error: powerbi gcc endpoint ap... - Microsoft Fabric Community

access token - Power BI REST API request error 403 when querying the dataset - Stack Overflow

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Mahhin_Shahzad1
Frequent Visitor

Hi @KarthikrajH01 ,
Please update if you tried out the suggestoin and if you have found some soultion or anything , 
I am facing the exact same Error , Your response would be of great help . 

Anonymous
Not applicable

Hi  @KarthikrajH01 ,

 

Based on my research and understanding, 403-related error codes are usually associated with insufficient permissions or disabled admin settings. Could you please explain how the AAD token is generated? If it is generated by an AAD user, only dataset owner permissions should be required. However, if it is called by a service principal profile, more settings and permissions might be needed, and some admin settings may need to be enabled. You can refer to this document for more details:

Embed Power BI content in an embedded analytics application with service principal and an applicatio...

 

You can check the official documentation for a description of the 403 error message:

Troubleshoot Power BI REST APIs - Power BI | Microsoft Learn

 

This is the related document, you can view this content:

Solved: Power BI REST API gives 403 forbidden (use service... - Microsoft Fabric Community

Solved: Government API 403 error: powerbi gcc endpoint ap... - Microsoft Fabric Community

access token - Power BI REST API request error 403 when querying the dataset - Stack Overflow

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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