Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Spurthi
New Member

Power BI Activity Log error while using PowerShell Scripts

Hi Team,

 

Trying to Download activity events by using the Power BI Management cmdlets for PowerShell for our tenant with help of this scrpits -

Login-PowerBI

$activities = Get-PowerBIActivityEvent -StartDateTime '2019-08-31T00:00:00' -EndDateTime '2019-08-31T23:59:59' | ConvertFrom-Json

$activities.Count
$activities[0]

 

But I am getting an error as stated below can you please help me where I am running as a administrator and have admin access also

Spurthi_0-1667395187203.png

Thanks,

Spurthi

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @Spurthi 

As searched :

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-11-03 00:00:00-2022-11-03 23:59:59), then I quit receiving the error.

For more information, you can refer to:

Get-PowerBIActivityEvent (MicrosoftPowerBIMgmt.Admin) | Microsoft Learn

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @Spurthi 

As searched :

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-11-03 00:00:00-2022-11-03 23:59:59), then I quit receiving the error.

For more information, you can refer to:

Get-PowerBIActivityEvent (MicrosoftPowerBIMgmt.Admin) | Microsoft Learn

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.