Forum Discussion
Creating a Dataflow to extract Power BI Audit Logs
I want to automate the process of pulling Audit Logs data from the Admin portal of Power BI.
Can I create a dataflow to directly extract the audit log data from the Admin portal and dump it in some sort of a Common Data Model ?
ALSO, CAN A POWER QUERY DIRECTLY EXTRACT DATA FROM THE AUDIT LOGS FROM THE ADMIN PORTAL ?
Is there any way other than writing a PowerShell script to extract the audit log data ?
Please suggest
Thanks in advance.
Hi Anonymous ,
By my research, I have not found the ways getting Power BI Audit Logs with power query or other ways.
So, I'm afraid that we may not create a Dataflow to extract Power BI Audit Logs currently.
Hope GilbertQ have other ideas.
Best Regards,
Cherry
- Hi there
Currently you have to extract the Audit Logs out into a CSV, which could then be read into a dataflow.
You would also currently have to be an Office 365 Admin to be able to extract data from the Audit Logs.
5 Replies
- v-piga-msftResident Rockstar
Hi Anonymous ,
By my research, I have not found the ways getting Power BI Audit Logs with power query or other ways.
So, I'm afraid that we may not create a Dataflow to extract Power BI Audit Logs currently.
Hope GilbertQ have other ideas.
Best Regards,
Cherry
- GilbertQSuper UserHi there
Currently you have to extract the Audit Logs out into a CSV, which could then be read into a dataflow.
You would also currently have to be an Office 365 Admin to be able to extract data from the Audit Logs.- AnonymousNot applicable
Thanks for the response Gilbert. So, just being a Power BI Service Admin will not work, I will have to be an Office 365 Admin as well. Is that what you meant ?
So, a power query cannot pull the audit logs directly. I will have to use some sort of a powershell script to extract the data in a CSV first. Please correct if my understanding is incorrect Gilbert.
- AnonymousNot applicable
Hi,
It is no longer needed to be a O365 admin to pull the data using PowerShell.
So far, the only way is to either pull the data using a PowerShell script or by downloading it from the website, but you can still automate it!
I did the following: I wrote a Powershell Script Function pulling data from a given day. This script can now be run automatically from microsoft flow using this method:
http://johnliu.net/blog/2018/4/run-any-pnp-powershell-in-one-azurefunction-from-microsoft-flow
You can save all the pulled data in a sharepoint folder in whatever format you prefer, and load them all into power bi using this method:
https://devinknightsql.com/2013/08/13/extracting-data-from-multiple-files-with-power-query/Works great so far.