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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

powerbi rest api creating refresh schedule with notifyoption with service principle profile

Hi all, as the title suggests, when creating a new profile, workspace and report for a multi-tenant environment. PowerBi automatically creates a refresh schedule that looks like this:

 

 

 

{
    "@odata.context": "https://api.powerbi.com/v1.0/myorg/groups/{groupId}/$metadata#Microsoft.PowerBI.ServiceContracts.Api.V1.RefreshSchedule",
    "days": [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
    ],
    "times": [
        "01:30"
    ],
    "enabled": false,
    "localTimeZoneId": "UTC",
    "notifyOption": "MailOnFailure"
}

 

 

 

We then have some code to automatically disable all refresh schedules since we have our own function app to refresh all datasets. I did however add some extra code to make sure the refresh schedule is always disabled. So I run a patch request to the refresh dataset in group endpoint with this body:

 

 

 

{
    "value": {
        "enabled": false,
    }
}

 

 

 

This request FAILS because the "MailOnFailure" is not valid for a service app owner workspace. 

 

This seems like an oversight and I want to report this as a bug, as now, we have to first send a request to change the NotifyOption and only after that we can make sure to send the `enabled: false` command.

Status: Investigating

Hi @anonymouseke ,

 

Based on the above information, I would suggest opening a Support Ticket.Ticket support engineers have access and will take your issue back to the PG team.

If you are a Power BI Pro or Fabric licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ Caitlyn

Comments
v-xiaoyan-msft
Community Support
Status changed to: Investigating

Hi @anonymouseke ,

 

Based on the above information, I would suggest opening a Support Ticket.Ticket support engineers have access and will take your issue back to the PG team.

If you are a Power BI Pro or Fabric licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ Caitlyn