Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
currently, we have a problem setting schedule refresh using API with enabled notifications (notifyOption = MailOnFailure) using Service principal (We use Service principal to init everything in our PowerBi workspace).
After we set up the dataset we want to define a Refresh Schedule for the dataset using API.
When we call Rest API with this body (Service Principal is dataset owner):
{
"value":
{
...
"notifyOption": "MailOnFailure"
}
}
An error is returned:
{
"error":{
"code":"InvalidRequest",
"message":"Invalid NotifyOption value 'MailOnFailure' for app only owner requests"
}
}
We know how to fix this problem by changing "notifyOption": "NoNotification". But notification are then disabled and we have to "manualy" check if any refresh error occured (we have a lot of workspaces with datasets). So this solution is not ideal.
Is it possible to configure mailOnFailure with Service Principal? Or add additional email recipients. Current Rest API does not support adding other recipients but in GUI it is possible to add other recipients. Or it does but it is not in Rest API doc?
Hi @petrVolfMBI,
AFAIK, some of the features are not released to the rest APIs(notice: they may be due to security or performance reasons) so that you can only use it on the power bi service side.
For this scenario, I'd like to suggest you submit ideas for these requirements.
Regards,
Xiaoxin Sheng
Your question showed me the answer to my problem, for which I thank you. Solved: Failing: Datasets.UpdateRefreshScheduleInGroupAsyn... - Microsoft Power BI Community
You may need to write your own daemon to check refresh results. You can write an Azure Function that calls restApiClient.Datasets.GetRefreshHistoryXXX().
I am glad that my problem helped you :-).
Thanks, I know how to solve my problem using the daemon (Probably the only solution for this problem for now 😞 ). I hope for a better solution 🙂
But I don't want to solve this that way. We have lots of datasets. And I see some problems like timing, schedules run at different times, refreshes take different amounts of time, and so on. Why should we waste other resources to check if something fails, when the functionality already exists. Power BI has the functionality to handle refresh errors and send an email about the error (But only for users). So, I would like to use the existing functionality for Service Principal.
Or add a notification list to Rest API. In GUI - API does not support that - it is possible to send failure messages to multiple users, but this is possible only for users.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |