Forum Discussion

NicolasLJ's avatar
NicolasLJ
Frequent Visitor
2 years ago
Solved

Power BI API : GET Refresh works, but POST does not

Hi,

 

I'm testing Dataset refresh through API with Postman.

I created and registered an app in AD with Dataset.ReadWrite.All Granted

When I send a GET resquest with a Bearer Token I get the history of refresh of the data set, but just changing the GET to a POST refresh to trigger a refresh send me back this answer :

 

{
    "error": {
        "code": "ItemNotFound",
        "message": "Dataset xxxxxx is not found! please verify datasetId is correct and user have sufficient permissions."
    }
}
 
 
Url and parameters are exactly the same, how the get can find the dataset but not the post ???

7 Replies

  • aj1973's avatar
    aj1973
    Community Champion

    Hi NicolasLJ 

    Did you the App Registration ID to the workspace where the dataset is located?

    Did allow the App to use API in the tenant le evel?

    • NicolasLJ's avatar
      NicolasLJ
      Frequent Visitor

      Note : I use pro licence, I don't have a premium capacity.

       

      I added the App and the group assigned to the app into the workspace as admin.

      A is the security group assigned to the service principal and P is the Service principal.

       

       

      I assigned Dataset.ReadWrite.All role in Azure and Granted by admin (Delegated)

       

      My POST API setup :

       

       

       

      And the answer :

       

      • aj1973's avatar
        aj1973
        Community Champion

        Hi NicolasLJ 

        The App registration doesn't need  Bearer tokens to connect to the service. You need to use your App Regsitration in a local machine and Powershell to execute the script.