Forum Discussion
Track Power BI user activities with Activity Log
I am just bumping this up. Maybe the original post is too wordy.
What I need is help accessing the Power BI Activity in order to retrieve audit/tracking data on who is accessing the reports, duration, frequenecy, etc. This article says we can do that using Power BI REST APIs.
https://learn.microsoft.com/en-us/power-bi/admin/service-admin-auditing
Her is info on the Power BI Get Activity Events REST APIs.
Admin - Get Activity Events - REST API (Power BI Power BI REST APIs) | Microsoft Learn
How do I run them from Powershell? I have been trying running the following command:
Invoke-PowerBIRestMethod -Url 'https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime=2023-02-10T00:00:00.000Z&endDateTime=2023-02-12T23:59:59.000Z' -Method Get
However, it fails. I have tried adding single quotations around the dates but it just adds it into one big string from the start date to the end date and fails. I have tried removing the .000Z from the end of the dates but it gives a date format error.
Any help would be appreciated.
Heyyy,
Did you manage to solve this issue?
Can you please, provide more information about this topic?