Tracking User & Admin Activities In Power BI Using Activity Log
The term Power BI Activity Log API refers to a new Power BI solution that was released in December 2019 and is currently available to the organization in the preview format. It is a simple REST API that is easy to use and works as a somewhat replacement for the Office 365 Audit Log.
The activity log table in Power BI brings back activities within the Power BI tenant of the user company. The process of accessing the usage data can be simplified through the use of PowerShell. In this, the user can call the REST API which brings back all the activities. This window of activities is accompanied by a continuation token.
Power BI activity log Uses, Requirements, And Methods
Uses of Power BI Activity Log:
The integration of Power BI with Office 365 has led to an increase in productivity in several sectors of the business arena. The uses of Power BI Activity Log can be categorized as:
Firstly, the usage data of Power BI has always been difficult to access as it requires elevated access rights beyond the general administrator access. Power BI activity logs, which were released in 2019, permitted service administrators to access the data without any additional permissions except their existing administrator rights. The process has improved the extent to which companies could track user activities.
Secondly, the audit or activity log data contains details for every interaction that users in the company’s tenant have with the Power BI service. The user company can then move beyond a simple audit trail towards measuring the extent to which the Power BI adoption is progressing through workspace usage reports.
Along with this, The Power BI activity log feature helps admins to ensure that they no longer mix the log data with data of other products.
Finally, the Power BI Activity Log contains only the Power BI activities structured list of activities audited. In addition to this, the global administrator role is not required to access the Power BI Activity Log.
Various Log sources in Power BI:
The knowledge of the array of actions on individual products is crucial in helping organizations fulfill their business goals. The instances of these goals include being compliant with the UTC format and keeping proper records.
The concept of log sources can be categorized as Activity Log and Unified Audit log.
- Activity Log: This log includes only the Power BI activity event entities. It can be accessed by all kinds of admins including global admins, Power Platform admins, and Power BI admins. There does not exist any user interface to search the activity logs yet. All the admins can download the activity log entries through Power BI REST API and management cmdlet. But, this does not keep activity data when the tenant is moved to a different Azure region.
- Unified Audit Log: The unified audit log contains events from Power BI, plus events from SharePoint Online, Exchange Online, Dynamics 365, and some other services. Access to this data is provided only to users with view-only audit logs or audit logs to which permissions are granted to global admins and auditors. These audits can search the unified audit log by using the Microsoft 365 Defender portal and the Microsoft 365 Compliance Center. The admins and auditors can download audit log entries through activity management solutions and cmdlets. This stores the audit data for 90 days. In addition to this, the audit data can be kept, even if the tenant is moved to a different Azure region.
Requirements of Activity Log and their uses:
The administrators of Power BI are capable of analyzing the use of Power BI resources at the tenant level through the use of custom reports. These custom usage reports are provided based on the Power BI Activity Log. The user company can download the activities by using a REST API or PowerShell cmdlet.
Additionally, the user organizations need to be familiar with the Admin API and the PowerShell modules of Power BI.
To access the Activity log, certain requirements need to be met. These include the following:
Firstly, the user is required to be a global admin or a Power BI Administrator.
Secondly, the installation of the Power BI Management cmdlets is essential. This installation can be done locally or the Power BI Management cmdlets in Azure Cloud Shell can be used.
Uses of ActivityEvents REST API:
The uses of ActivityEvents REST API include the following:
The stored data can then be used to build a custom usage report on top of the exported data. In the ActivityEvents REST API call, you must specify a start date and end date and optionally a filter to select activities by activity type or user ID.
Thirdly, as the activity log can contain a large amount of data, the ActivityEvents API currently only supports downloading up to one day of data per request. This implies that the starting date and ending date must specify the same day. The user company needs to ensure that the date and time values are in the compliant UTC format.
Methods of searching Power BI Activities:
Power BI Activities can be differentiated as activity by capacity, activity by domain, and activity by category. The methods of searching Power BI Activities are enumerated as follows:-
- Search audit logs by date – The Activity logs can be searched using the date range between the Start Date and End date. The default selection is seven days and the highest range available is 90 days.
- Search audit logs by users – Audit logs can also be searched based on specific activities done by specific users by entering one or more user names in the Users field.
- Search audit logs by file, folder, or site – To determine who accessed a secure file, folder or site enter the file name, folder name or URL in the File, Folder or Site field on the Audit page.
Extracting Power BI Activity Log with Data Factory:
Azure Data Factory is one of the simplest data extraction tools available to companies using Power BI Activity Log. The user can easily set up a schedule and ingest data in one of the several destinations supported by Data Factory. A set of steps need to be followed to extract data using Data Factory, which include:-
i) creating a new security group in Azure Active Directory,
ii) adding the “managed identity” of the user Data Factory resource as a member of the security group, and
iii) finally adding the security group to the Admin API tenant setting in the Power BI admin portal.
Using PowerShell for exporting audit logs:
While the option of using the audit log search tool in the Microsoft Purview compliance portal is available for searching and exporting audit log records, PowerShell is the most efficient method. The search-unified audit log cmdlet within Exchange Online PowerShell helps in exporting the results of an audit log search to a CSV file.
One of the biggest advantages of using the PowerShell cmdlet is the fact that the user can search for events from a certain service by using the Record Type parameter.
Power BI Event Activity Log API: Meaning
The Power BI Event Activity Log API is an efficiently suited API that is designed to use tools like Azure Data Factory to iterate historical data, store log files in Azure Data Lake Storage and incrementally update a data model in Power BI for reporting and analysis.
EPC Group as the Power BI Consulting Partner:
The EPC Group is a leading consulting firm for Power BI that deals with business intelligence, collaboration, and information management processes in the USA. The company consists of more than 75 certified Power BI consultants who are experts in leveraging the Power BI features for the user company.
As a unique Power BI Consulting firm, the organization also uses personalized methods to ensure that the user companies can embed dashboards and become highly functional. Thus, the EPC Group is a prospective choice for companies intending to use Power BI for reaching organizational goals.
Sas Chatterjee is a Senior Architect with EPC Group. His focus lies in making sure that the execution of each engagement is delivered in a forward compatible, best practices manner. Sas is an extremely devoted professional and takes each project he is assigned very seriously. During the project execution phase, Sas invests the time needed with his clients to gain a full understanding of their requirements and develops a roadmap for achieving their desired end goal.