Forum Discussion

Cortana's avatar
Cortana
Helper IV
2 years ago
Solved

How to change parameter using REST API?

I wanted to change the parameter of a dataset using Python. I created an app with permission Dataset.ReadWrite.ALL from Azure AD. I was able to get the Access token successfully but could not change...
  • FabricGuy's avatar
    2 years ago

    Hi Cortana

     

    The error message says that your Service Principal (SPN) is not the Owner of the Semantic Model. I guess you created the report in Power BI Desktop and published it afterwards on behalf of your name. Now, that you wish to update the Parameter, you first need to take ownership by calling this REST API call with the SPN in your Python code: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/take-over-in-group Afterwards, once the SPN is owner, your call to update the parameter will work.

     

    Hope it helps.