Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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).
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.
Solved! Go to Solution.
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:
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.
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 .
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:
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.