Forum Discussion
Using Service Principal for refreshing datasets published in PowerBI Premium Per user workspace
I was confused with your answer, so I tried this morning. I was able to use a Service Principal and Run a Refresh for a dataset in a Premium Per User Workspace.
The SP was admin in the workspace and it is also admin to handle the PBI API (the option in the tenant settings under admin portal).
The doc doesn't say anything about that limitation: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group
I think you have a problem in the environment or the requests.
Regards
P/D I have used a python lib to test it.
I tried refreshing the dataset using Service Principal but not able to acheive it. I also get the bearer token, still it is showing to Sign in to your account.
In the Azure Automation account, I have import the MicrosoftPowerBIMgmt.Profile module and created the powershell runbook.
Below is the powershell script: