Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello, I am refreshing my published datasets via the Rest API in Python. It seems as though I cannot turn on the NotifyOption in my request. Trying to set the notifyOption to "MailOnCompletion" or "MailOnFailure" produces a 400: Bad Request result. I'm not sure if there is something wrong with my set up or if this is simply not allowed.
Here is my code:
dataset_url = f"https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/datasets"
header = {'Authorization': f'Bearer {access_token}','Content-Type':'application/json'}
url = 'https://api.powerbi.com/v1.0/myorg/groups/' + workspace_id + '/datasets/' +datasetid+ '/refreshes'
payload = {'refreshRequest':'y', 'notifyOption':'MailOnCompletion'}
data = json.dumps(payload)
response = requests.request("POST", url, headers=header, data=data)The output of this code is:
{"error":{"code":"InvalidRequest","message":"NotifyOption parameter value is not supported for application requests","target":"Parameter value 'MailOnCompletion' is invalid for application requests"}}If I remove the notifyOption or set notifyOption to "NoNotification" the request works fine and the desired dataset is refreshed.
Hi @amhiggins ,
I can't reproduce the scenario.
You may take a look at this topic.
https://community.powerbi.com/t5/Developer/PowerBI-REST-API/m-p/1007546
Best Regards,
Jay
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 8 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 37 | |
| 30 | |
| 26 | |
| 21 | |
| 19 |