Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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

     

  • GilbertQ's avatar
    GilbertQ
    7 years ago
    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-msft's avatar
    v-piga-msft
    Resident 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

     

    • GilbertQ's avatar
      GilbertQ
      Super User
      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.
      • Anonymous's avatar
        Anonymous
        Not 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.

  • Anonymous's avatar
    Anonymous
    Not 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.