This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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?
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |