maikvandergaag / msft-extensions

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

How to refresh dataset #553

Open settings001 opened 6 days ago

settings001 commented 6 days ago

For which extension would you like to add a feature request? Power BI Action: DataRefresh (task ver 5.*)

Question I am trying to refresh the data, but I am ending up with an error as it requires me to provide data source credentials. The option is locked because of the "Take Ownership" bit required to auto-change Workspace ID. Is there any automated way to add those credentials via pipeline or is it only a manual process? Dataset is created based on the Microsoft Sentinel logs, not using SQL instance.

Currently, the pipeline comes with the following stages:

  1. Publish Customer BI Reports
  2. Take Ownership
  3. Change Workspace ID
  4. Refresh Data
maikvandergaag commented 6 days ago

Think this is related to something that is going wrong in the previous steps or something that is not being supported by the Power Bi API's that Microsoft has.

Please share more info

settings001 commented 6 days ago

Hi @maikvandergaag

So, to refresh the data I would need to have assigned data source credentials. image

This option is being blocked once the "Take Ownership" bit is in place as the service principal will take over the semantic model in Power BI, image

but at the same time, I need to use Take Ownership to change the Workspace ID (this is being set up as a parameter).

It seems to be a little bit more complicated as I am trying to push a single report over to multiple tenants so the Workspace ID parameter is a must.

The solution would be to add the service principal (or user account) to the data source credentials via pipeline but I don't see that option being available.

The current workaround is a manual step where I would need to take over the dataset using the admin account and then manually add data source credentials, this way I can enable the refresh option.

maikvandergaag commented 5 days ago

And if you use the parameter update action of the task, or am I misunderstanding what you are trying to do?

settings001 commented 5 days ago

I am using the parameter update action on the task, that one works fine.

Problem comes after when you can't refresh the dataset because it has been taken by the service principal.