The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to create a Power BI report that would monitor "create workspace and delete workspace" operations on my Power BI platform so I am looking at the newly Power BI usage log and unified audit logs - see article: https://docs.microsoft.com/en-us/power-bi/admin/service-admin-auditing But I can't seem to find both operations listed as operations captured. On extracted records using Get-PowerBIActivityEvent command, I also can't see both operations there. I am sure they should be there because I did perform both operations recently.
Please can someone point me to another was to capture metrics that will allow me report on those operations ?
Look for CreateGroup opration for worksapce creation and DeleteGroup for workspace deletion
If this post helps, then please consider Accept it as the solution and give it a thumbs up
Thanks a lot for getting back to me. Yes, CreateGroup and DeleteGroup are operations listed as operations, so thanks for that. But it is still not listed as one of the operations in my export. I am sure I created a bunch of workspaces and deleted them to confirm they are capture in output. Please do u have a link to any documentation that explains those operations and what they mean - I can't seem to find one.
The PS script I ran to get my output is:
$BasePath = "C:\Data"
$activityLogOutput = $BasePath + "PBIActivityLog.csv"
$Daysback = 30
$Date = (Get-Date).ToString('yyyy-MM-dd')
$consolidatedDataset = @()
# Install modeule required to run Get-PowerBIActivityEvent if u haven't done so
#Install-Module -Name MicrosoftPowerBIMgmt -Force
# Remove data file if it exists
if (Test-Path $activityLogOutput)
{
Remove-Item $activityLogOutput
}
for ($i = 1; $i -le $Daysback; $i++)
{
$StartDateToExtract = (((Get-Date).AddDays(-$i)).ToUniversalTime()).ToString('yyyy-MM-ddT00:00:00.000')
$EndDateToExtract = (((Get-Date).AddDays(-$i)).ToUniversalTime()).ToString('yyyy-MM-ddT23:59:59.999')
$activities = ''
$activities = Get-PowerBIActivityEvent -StartDateTime $StartDateToExtract -EndDateTime $EndDateToExtract | ConvertFrom-JSON
$consolidatedDataset += $activities
#$consolidatedDataset | Out-File($activityLogOutput) -NoNewline -Append
$consolidatedDataset | Select *, @{Name = "RefreshDate"; Expression = {$Date}} | Export-Csv -Path $activityLogOutput -NoTypeInformation -Append
}
I know you question @chiamaka is pretty old, but maybe someone else is stumbling across this.
The correct activities for creating and deleting workspaces are:
Propably because those terms are taken from the on premise report server, were workspaces were folders 😉
However, an important side note: the DeleteFolder operation does not capture the name of the deleted workspace, which makes it impossible to track the lifecycle of a workspace.
Also it will be interesting how the log operation name is changing, when real folders inside of workspaces are introduced in the future...