maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
125 stars 80 forks source link

Cannot update dataset when using Service Principal #269

Closed RobertAltman-CPS closed 3 years ago

RobertAltman-CPS commented 3 years ago

I am attempting to use DevOps to deploy report updates and then set the dataset to a different server (and database). We are using service principals since this is a Power BI embedded scenario.

The steps I have set up are:

The first two tasks succeed, and I am able to confirm that the service principal has ownership of the dataset by looking at the dataset on the powerbi website. Unfortunately, the change dataset fails with the message, "This operation is only supported for the dataset owner".

Not sure where to go next or how to resolve this. Thanks.

(I just re-ran the test with Update Dataset for only the specific data set I am testing and got the same error.)

maikvandergaag commented 3 years ago

Could you add the system.debug variable with the value true and run the flow again and send the log files?

RobertAltman-CPS commented 3 years ago

Agent job.zip

There are several reports in the release; I am only testing with the first report, "340B Performance Report" (if that works, I will add the others in).

Let me know if you need any additional information. Thanks.

maikvandergaag commented 3 years ago

@RobertAltman-CPS: Thing I see in the logs is that you are targetting different workspaces. Please check the configuration of your tasts

RobertAltman-CPS commented 3 years ago

That resolved my first stumbling block; now I am back to my original problem when trying to update the datasource. The error I am getting is "Dataset doesn't contain a datasource that matches selector #1" and I am guessing that it has to do with the server or database parameters, but they appear correct and I am not sure how else to validate that. I am attaching a log from my latest test run.

ReleaseLogs_539.zip

I've been digging into this further and it appears that the problem might come in that the action is finding a different report with a different datasource and failing somehow when it is examining that report.

maikvandergaag commented 3 years ago

@RobertAltman-CPS: The script tries to find a existing configuration with that setting. Occording to the error it is not able to find that parameter with the old server.

What you could try is getting the value via the PowerBI Api to be absolutly sure you have the correct values.