Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Updating parameters through the service API

We are using parameters to change our database dynamically in reports deployed to the Power BI service. It works great. Now I'd like to be able to do more through API calls as opposed to manually upd...
  • yoavo's avatar
    7 years ago

    My guess is that you are NOT the same user when you use the APIs, as when you login to the portal. You probably are within the same tenant/group (as you can see the data), but not allowed to modify datasets in the way the owner can.

    Do other “Write” APIs work for you? For example Update Datasources (see https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasources)? I think you will get the same error.

     

    You can try (via API, with the same authentication you do) to Take Over the dataset (https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/takeoveringroup) after that, you should be able to execute Update parameters. Also, if you then get into the Portal UI (with the original credentials you use now) and go to the Schedule Refresh page of the dataset, you will see who the owner is now (once you are not the owner, a line appears there saying “the dataset has been configured by …….. Would you like to take over the setting?”

     

    Also, in the future when you post a request/response, please paste the entire raw data (you can remove the authentication token…) so we can see the request Id etc. and if necessary, investigate in our internal logging.