cancel
Showing results for 
Search instead for 
Did you mean: 

API: Update Parameters In Group returns 500 Internal Server Error

API call to update dataset params in group (Default.UpdateParameters) has suddenly stopped working and returns 500 now. All other methods seem to be working fine (e.g. Get parameters). Also no problems with manually updating the parameters from Power BI Service UI with the same user credentials.

 

I'm calling Datasets.UpdateParametersInGroupAsync method from .NET and the code hasn't been changed for months. 

Status: New
Comments
romanovmv
Frequent Visitor

Just found out that it's related to the premium capacity assigned. It helps when I remove it and assign it back. The problem is I have around 100 workspaces assigned to it and will probably need to write a script....

v-lili6-msft
Community Support

hi  @romanovmv 

It's pleasant that you figured it out, maybe do it manually is also a good way.

 

Regards,

Lin

romanovmv
Frequent Visitor

Hi @v-lili6-msft ,

 

Actually it only helps for a few minutes and then breaks again. I tried to create a new subscription of power BI embedded with a different SKU, doesn't help as well.

It's a bit frustrating because we have two different accounts in two different regions and the Australian one works fine, it's just US one that is unstable. 

I can't do that manually because it's an automatic process that creates the workspaces, published reports, etc.  I mean I can of course, but it will be a mess.

romanovmv
Frequent Visitor

I found the reason for the issue and could reproduce it.

1. Create a parameter in a pbix file and use it in PowerQuery to generate the connection string to SQL server. In our case the value was "uk001p" that matched the server name.

2. Create an on-premises gateway datasource to the same server with the same server name (not IP, the same text).

3. Publish the report to the workspace. After publishing it automatically matches the data source in the dataset with the data source in a gateway and assigns the gateway to the dataset.

4. Try to change the parameter name to be UK001P (the same value but different case) - it will fail for both API and Power BI Service UI.

5. Try to change the parameter name to be UK001P2 (any other value that doesn't match in case-insensitive mode) and it succeeds with a warning that your credentials should be updated (kinda expected)

 

So the problem is in the upper/lower case when matching the datasources between dataset and gateway. 

Again, it doesn't happend in the AU environment, just US.