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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Refresh dataset with API and failure notification

Hello.

 

I'm setting up execution of Power BI report refreshes with API calls.

Everything is fine, but one thing.

I can not understand who is the recipient of failure notification when i set notifyOption to MailOnFailure.

How to customize email address for delivery of such notifications?

 

Thanks in advance.

 

Regards,

Daniil.

19 REPLIES 19
AnonymousPerson
Advocate V
Advocate V

Has there been any update on this since March 2022?

I am using a service principal to refresh a dataset with an API call, and never got anything when it failed.

lbendlin
Super User
Super User

In the Power BI service, in the Dataset settings. There you can specify the recipients.

Anonymous
Not applicable

Or you mean some API endpoint that allows to set this setting?

 

Looks like only the dataset owner gets notified for API initiated refreshes.

Anonymous
Not applicable

I am dataset owner. And i recieved nothing

I tested it on my side and did receive the email.  Did you specify "MailOnCompletion"  ?

Anonymous
Not applicable

Sorry for long response

 

I'm not interested in notification in case of completion. I'm interested in notification in case of failure.

DaniilTerentyev_0-1632378331183.png

Here is the code that i execute.

 

Here is refresh log of dataset

DaniilTerentyev_1-1632378436234.png

 

It has failed. But i have no notification

Try

 

-Body (ConvertTo-Json @($request))

Anonymous
Not applicable

Thanks for your response.

That didn't help

 

Here is the request code:

DaniilTerentyev_0-1632470046973.png

 

Here is the refresh log:

DaniilTerentyev_1-1632470069085.png

 

Regards,

Daniil.

 

can you try with MailOnCompletion for another dataset that refreshes successfully?

Anonymous
Not applicable

It works in absolutely same way as MailOnFailure. There is no notification in my inbox.

 

DaniilTerentyev_0-1632898589358.png

 

DaniilTerentyev_1-1632898620288.png

 

Check your spam folders. Let another developer try on their dataset. Check with your email admin for blockages etc.

Anonymous
Not applicable

There is everything fine with mail.

Most probably i don't have email delivered because service user for execution of API requests has been created with Active Directory, not with https://dev.powerbi.com/Apps

 

Even if i create user with https://dev.powerbi.com/Apps, the only one user, who created service principal will know, that there is something wrong with refresh, not the dataset owner.

 

So for now this feature is not mature enough to refresh datasets in real world.

 

Regards,

Daniil.

try this:

 

$request = @{

"notifyOption" = "MailOnFailure"

}

I don't think you had mentioned that you are using a service principal for the refresh request. I'll check with our developers that use a similar setup.

@lbendlin Any luck on this? I'm calling a refresh request using a service principal. Request is called from Azure Data Factory pipeline using a webactivity with the following setting:

GdBreems_0-1647960673076.png

 

No mail is received by the Owner or any additional contacts specified in powerBI scheduled refresh. Refresh of the dataset is completed correctly.

My contacts say the same thing - when you use a service principal to request the refresh no communication will be sent out at all.

 

Not sure if this is a bug or a feature. If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/

Thank you for your response, too bad it doesn't work at this moment in time.

 

I will probably be raising a ticket and hope for change!

Anonymous
Not applicable

Thanks for your response.

Those recipients are used only in case of scheduled refreshes

 

Here how it looks:

DaniilTerentyev_0-1632297871244.pngDaniilTerentyev_1-1632297915760.png

And here how refresh log looks

 

No messages were delivered to Me (Terentyev Daniil)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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