Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Trying to collect activity data from the cloud following instructions here https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events,
keep getting this error: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2026-02-13T00:00:00.000Z'&end...
What is wrong with this request?
Solved! Go to Solution.
Solution found. Here are correct date formats accepted by API:
#Set Power BI REST API to get Activities for today url = "https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='" + activityDate + "T00:00:00'&endDateTime='" + activityDate + "T23:59:59'"
(found in this post: https://community.fabric.microsoft.com/t5/Developer/Power-BI-Get-Activity-REST-API/m-p/3564225)
Or alternatevely the following transformations helped to achieve the proper date:
Solution found. Here are correct date formats accepted by API:
#Set Power BI REST API to get Activities for today url = "https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='" + activityDate + "T00:00:00'&endDateTime='" + activityDate + "T23:59:59'"
(found in this post: https://community.fabric.microsoft.com/t5/Developer/Power-BI-Get-Activity-REST-API/m-p/3564225)
Or alternatevely the following transformations helped to achieve the proper date:
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |