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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
stefanik
Helper I
Helper I

NotifyOption with Service Principal

Hi All,

i have many reports published to PowerBI Service that has a service Principal as owner.

It is possible to set an email address into them in order to receive an info when the refresh fails?

 

I've tried with refreshScedule endpoint and this body:

 

{
  "value": {
    "notifyOption": "MailOnFailure",
    "times": [
      "08:00",
      "09:30",
      "10:00",
      "10:30",
      "11:00",
      "11:30"
    ],
    "enabled":"True"
  }
}
 
But it returns:
 
{
    "error": {
        "code""InvalidRequest",
        "message""Invalid NotifyOption value 'MailOnFailure' for app only owner requests"
    }
}
 
Thx
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@stefanik  

 

As it said MailOnFailure is only avaible for app owner, you could take over ownership:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/takeoveringroup


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@stefanik  

 

As it said MailOnFailure is only avaible for app owner, you could take over ownership:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/takeoveringroup


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

ibarrau
Super User
Super User

Hi. I'm not sure about configuration with API. I can tell you that datasets have one owner and I don't know if a Service Principal can be one. For example it usually is the account that has configurated the gateway for that dataset. You can see that option in Power Bi Service in the same menu I am mentoning below.

Have you tried the manual way? Go into the dataset logged in Power Bi and schedule refresh options.

Schedule refreshSchedule refresh

There you can add mails for failures.

Hope this helps,

 

P/D If you want to control everything with code you can always try the refresh on demand and set your own code asking for status response and sending mails.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Thx,

yes, manually it's ok but i need to do it by API because i have tons of reports to configure.

I've build an automatic procedure to publish my "template.pbix" many times (one for each customer), but i'm not able to control the refresh outcome.

 

Thx

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.