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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
janfcarl
Helper I
Helper I

Disabling a refresh schedule throws Bad Request

Hi, I am trying to disable a scheduled refresh on a dataset, using Power BI for C#. I can sucessfully add a scheduled refresh by using the below code.

 

var refreshSchedule = new RefreshSchedule(days, times, true, "UTC", ScheduleNotifyOption.NoNotification);
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);

 

I tried to retrieve the existing schedule and setting Enabled = false,

 

var refreshSchedule = powerBiClient.Datasets.GetRefreshScheduleInGroup(new Guid(workspaceId), datasetId);
refreshSchedule.Enabled = false;
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);

 

as well as just adding a new, disabled schedule,

 

var refreshSchedule = new RefreshSchedule(null, null, false, "UTC", ScheduleNotifyOption.NoNotification);
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);

 

but either ways throws a Bad Request error.

2 REPLIES 2
Anonymous
Not applicable

Hi @janfcarl,

What type of workspace and contents are you working on? Any specific setting that you apply to the content you used? Have you confirmed the permission setting that API required? Please share some more detail bout these operations to help us clarify and reproduce the scenario:

How to Get Your Question Answered Quickly 

In addition, have you tried to directly test on the rest API document with 'try it' option?

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.