Forum Discussion
Enhanced REST API dataset Refresh Forbidden (403)
Hi everyone!
I'm struggling to see what my issue is when attempting to utilize the enhanced dataset refresh via the REST api and Power Automate. I'm getting a 403 error when trying to add optional parameters for Asynchronous refresh:
As per requirements, I have supplied and ensured that I have all of the criteria:
Scope:
Next, for authentication, it says all calls must be authenticated with a valid AAD, and I believe I have everything that's required:
Side Note: If I don't add the optional parameters my refresh kicks off just fine
Can anyone spot an issue with my settings / configurations?
I hnguy71 ,
I had a similar issue trying to selectively refresh tables with the API via Power Automate. (Unfortunatly I'm struggling to recreate the issue now but I think it was the same error).
I found going into Settings:
and turning off Asynchronous Pattern fixed the issue.
I suspect it's merely masking an underlying problem with how I've got things setup but I was unable to work out what! Hope it either fixes it enough or point you/someone else in the right direction.
9 Replies
- bcdobbsCommunity Champion
I hnguy71 ,
I had a similar issue trying to selectively refresh tables with the API via Power Automate. (Unfortunatly I'm struggling to recreate the issue now but I think it was the same error).
I found going into Settings:
and turning off Asynchronous Pattern fixed the issue.
I suspect it's merely masking an underlying problem with how I've got things setup but I was unable to work out what! Hope it either fixes it enough or point you/someone else in the right direction.
- GuillermoAMFrequent Visitor
Thanks for that answer, I was almost giving up when I found that post.
Now my custom connector makes API calls without error.
- tackytechtomMost Valuable Professional
Hi hnguy71 ,
I have never used the API from Power Automate, but I have written a blog post on how to use the API from data factory using its own managed identity. I pressume the authentication steps should be the same, it is the same API call after all.
Three things that come up my mind:
Have you enabled the Allow service principles to use Power BI APIs in the Admin Portal of Power BI?
Have you added the service principal to a security group and have you added that security group to Power BI?
Have you added then service principal as a member to the workspace which contains the dataset to refresh?
Hope any of this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- hnguy71Super User
Hi tackytechtom!
Thanks for the response and amazing looking blob post! All my settings seems identical to yours and I don't see any abnormality from that but let me check the tenant level settings and see if anything is off.
If you don't mind, could you test using this sample payload and see if it works for you?
{ "notifyOption": "NoNotification", "retryCount": 3 }- bcdobbsCommunity Champion
Another thought which might not be relevant. Your request body includes notfyOption and retryCout.
Reading:
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs
My understanding (although may be wrong) is that retryCount is a property of an Enhanced refresh. The documentation states:
- For enhanced refresh,
notifyOptionis not required and must be excluded from the request body. However, one or more parameters other thannotifyOptionare required.
- For enhanced refresh,
- po-weiMicrosoft Employee
Hi,
I'm one of the engineer working on this API. Could you first try invoke other API? From the reading, it seems like a general API authentication issue.
- skcary2Frequent Visitor
Hi just wanted to add I had a similar issue as others with the aysnchronous setting. I did this within a Logic App using a custom connector, so the setting to turn off is located in a different location. See the screenshot below you have to click the three dots and go to settings.
I used Chris Webb's tutorial for setting up the custom connector as detailed here: https://blog.crossjoin.co.uk/2022/08/14/calling-the-power-bi-enhanced-refresh-api-from-power-automate-part-2-refreshing-specific-tables-and-partitions/