Forum Discussion

hnguy71's avatar
hnguy71
Super User
4 years ago
Solved

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?

 

  • 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

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    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.

    • hnguy71's avatar
      hnguy71
      Super User

      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!

    • GuillermoAM's avatar
      GuillermoAM
      Frequent Visitor

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

  • tackytechtom's avatar
    tackytechtom
    Most 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/

    • hnguy71's avatar
      hnguy71
      Super 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
      }

       

      • bcdobbs's avatar
        bcdobbs
        Community 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, notifyOption is not required and must be excluded from the request body. However, one or more parameters other than notifyOption are required.
  • po-wei's avatar
    po-wei
    Microsoft 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.