Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
We are writing a C# application to automate the creation of datasets for specific customers in a Power BI Embedded Capacity (v2). We are using latest versions of the following Nuget packages: Microsoft.PowerBI.API (v4.2.0) ("REST API Library") and Microsoft.AnalysisServices.NetCore.retail.amd64 (v.19.32.0) ("TOM API Library"). We authenticate our API calls with access tokens issued to an AAD Service Principal which, as far as we know, has all necessary permissions in Power BI.
We are able to:
But we get a 400 Bad Request when we try to create a refresh schedule for the dataset. We call Datasets.UpdateRefreshScheduleInGroupAsync() with what we believe are the correct parameters. Here is the code:
var schedule = new RefreshSchedule
{
Days = new List<Days?> { Days.Monday },
Times = new List<string> { "01:00" },
LocalTimeZoneId = "Eastern Standard Time",
Enabled = true
};
await restApiClient.Datasets.UpdateRefreshScheduleInGroupAsync(
workspaceId,
datasetId.ToString(),
schedule);
It throws Exception: 400 Bad Request. We receive no other information about what caused the failure.
We have tried sending a RefreshSchedule without setting any properties except Enabled = true, and also sending a RefreshSchedule with only Days and Enabled properties set. No matter what properties we set, we always get Exception: 400 Bad Request.
How do we make this work?
Solved! Go to Solution.
No one else replied, but I found the solution. The RefeshSchedule needs to set NotifyOption to ScheduleNotifyOption.NoNotification. That's apparently because the dataset owner is a service principal, and NoNotification is apparently not the default.
var schedule = new RefreshSchedule
{
Days = new List<Days?> { Days.Monday },
Times = new List<string> { "01:00" },
LocalTimeZoneId = "Eastern Standard Time",
Enabled = true,
NotifyOption = ScheduleNotifyOption.NoNotification
};
Microsoft, would you please document this so we don't spend days figuring it out?
No one else replied, but I found the solution. The RefeshSchedule needs to set NotifyOption to ScheduleNotifyOption.NoNotification. That's apparently because the dataset owner is a service principal, and NoNotification is apparently not the default.
var schedule = new RefreshSchedule
{
Days = new List<Days?> { Days.Monday },
Times = new List<string> { "01:00" },
LocalTimeZoneId = "Eastern Standard Time",
Enabled = true,
NotifyOption = ScheduleNotifyOption.NoNotification
};
Microsoft, would you please document this so we don't spend days figuring it out?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 2 |