Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BizIntel
Frequent Visitor

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.

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

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

https://www.tackytech.blog

https://www.instagram.com/tackytechtom



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

3 REPLIES 3
BizIntel
Frequent 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.

I think you refer to this one, right?

tomfox_0-1644441509058.png

 

However, I think it is this one that gives the appropriate rights for you service principle:

tomfox_1-1644441577441.png


The blog post does step-by-step instructions with pictures. You might wanna check whether you have the same settings?

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

tackytechtom
Super User
Super User

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

https://www.tackytech.blog

https://www.instagram.com/tackytechtom



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors