Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
I am a Power BI Admin, and did run Login-PowerBiServiceAccount first
Say if I run:
Get-PowerBIActivityEvent -StartDateTime 2022-04-24T12:00:00 -EndDateTime 2022-04-25T12:00:00
I receive the error:
Operation returned an invalid status code 'BadRequest',Microsoft.PowerBI.Commands.Admin.GetPowerBIActivityEvent
Not really sure how to troubleshoot...
Solved! Go to Solution.
I had this same issue today and then noticed this in the documentation:
The Get-PowerBIActivityEvent cmdlet takes a StartDateTime and an EndDateTime parameter with the same restrictions as the ActivityEvents REST API. In other words, the start date and end date must reference the same date value because you can only retrieve the activity data for one day at a time.
After I set my dates to start and end on the same day (2022-04-26 00:00:00-2022-04-26 23:59:59), then I quit receiving the error.
uhg THIS is true... I guess since it could be an insanely huge JSON file... I guess I need to run it a lot... I wish it was a 3 day window. I would feel a little better about missing info getting caught.
I guess i can simply "check" to see if a day was missed and reload that single day.... I know 30 days out and its gone.
I am a Power BI Admin, and did run Login-PowerBiServiceAccount first
Say if I run:
Get-PowerBIActivityEvent -StartDateTime 2022-04-24T12:00:00 -EndDateTime 2022-04-25T12:00:00
I receive the error:
Operation returned an invalid status code 'BadRequest',Microsoft.PowerBI.Commands.Admin.GetPowerBIActivityEvent
Not really sure how to troubleshoot...
I had this same issue today and then noticed this in the documentation:
The Get-PowerBIActivityEvent cmdlet takes a StartDateTime and an EndDateTime parameter with the same restrictions as the ActivityEvents REST API. In other words, the start date and end date must reference the same date value because you can only retrieve the activity data for one day at a time.
After I set my dates to start and end on the same day (2022-04-26 00:00:00-2022-04-26 23:59:59), then I quit receiving the error.
I am an admin and successfully connected upon running Connect-PowerBIServiceAccount
Right out of https://learn.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.admin/get-powerbiactivityev... I run the folllowing:
Get-PowerBIActivityEvent -StartDateTime 2019-08-10T14:35:20 -EndDateTime 2019-08-10T18:25:50
I still get "Bad Request"
Get-PowerBIActivityEvent : Operation returned an invalid status code 'BadRequest'
At line:1 char:1
+ Get-PowerBIActivityEvent -StartDateTime 2019-08-10T14:35:20 -EndDateT ...
I can't figure out what's wrong.
oh...it has to be the same day, not just a 24 hour window. I did not realize that, thanks!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
30 | |
24 | |
22 | |
21 |
User | Count |
---|---|
58 | |
41 | |
24 | |
24 | |
21 |