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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.