Forum Discussion
Get Refresh History API with a service Principal
Does anyone know if the API 'Datasets - Get Refresh History' can be called using a Service Principal?
I am able to use the Service Principal to call the 'Admin - Get Refreshables', but it only brings back Premium workspaces.
Hi BizIntel,
I have actually written a blog post about this.
It explains how to trigger a dataset refresh from Azure Data Factory via API by using a service principal. This API call uses the POST method to initiate a refresh. If you use the GET method instead you should be able to get the refresh history.
Hope this helps 🙂
/Tom
3 Replies
- tackytechtom
Most Valuable Professional
Hi BizIntel,
I have actually written a blog post about this.
It explains how to trigger a dataset refresh from Azure Data Factory via API by using a service principal. This API call uses the POST method to initiate a refresh. If you use the GET method instead you should be able to get the refresh history.
Hope this helps 🙂
/Tom
- BizIntelFrequent Visitor
Hi Tom,
First, thank you for the reply. It's nice to know I'm not the only one trying to do this.
However, I'm still unable to get either (post or get) api to run.
Additional context: I am already using the Data Factory Service Principal in the security group in Admin API Settings - allow service principals to use read-only Power BI admin APIs.
Do you think that may be causing me to still be unable to use the Dataset Refresh API? I am using 2 different security groups, but it's the same service principal inside each group.
- tackytechtom
Most Valuable Professional
I think you refer to this one, right?
However, I think it is this one that gives the appropriate rights for you service principle:
The blog post does step-by-step instructions with pictures. You might wanna check whether you have the same settings?/Tom
https://www.instagram.com/tackytechtom