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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hnguy71
Memorable Member
Memorable Member

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:

hnguy71_14-1657048990688.png

 

 

hnguy71_7-1657046902119.png

 

As per requirements, I have supplied and ensured that I have all of the criteria:

hnguy71_0-1657046133541.png

Scope:

hnguy71_5-1657046633779.png

 

 

Next, for authentication, it says all calls must be authenticated with a valid AAD, and I believe I have everything that's required:

hnguy71_1-1657046305669.png

hnguy71_11-1657048683019.png

 

Side Note: If I don't add the optional parameters my refresh kicks off just fine

 

hnguy71_12-1657048829494.png

 

Can anyone spot an issue with my settings / configurations?

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
1 ACCEPTED SOLUTION
bcdobbs
Super User
Super User

@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:

bcdobbs_1-1658083342551.png

and turning off Asynchronous Pattern fixed the issue.

bcdobbs_0-1658083300802.png

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.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

9 REPLIES 9
bcdobbs
Super User
Super User

@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:

bcdobbs_1-1658083342551.png

and turning off Asynchronous Pattern fixed the issue.

bcdobbs_0-1658083300802.png

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.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Thanks for that answer, I was almost giving up when I found that post.
Now my custom connector makes API calls without error.

hi @bcdobbs,

 

I turned off the the Async Pattern setting and now it works! Woosah! That setting was the culprit the entire time! Who would have thought!

 

Thanks for your help!



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
po-wei
Employee
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.

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. 

 

 

skcary2_5-1693511363990.png

 

 

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-automat... 

 

 

 

 

Hi @po-wei,


My apologies. Could you elaborate on your comment regarding "first try invoking other API"? I can execute and call all other RESToperations. 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
tackytechtom
Super User
Super User

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

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
}

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

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, notifyOption is not required and must be excluded from the request body. However, one or more parameters other than notifyOption are required.


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors