Author Note
All content, including samples, images and writings can be found in my GitHub repo:aliyoussefi/MonitoringPowerPlatform: This repo is designed to document and provide guidance on Monitoring with the Power Platform (github.com)
Revisions
02/12/2023 - Fixed images, updated Office 365 Security and Compliance Center to Microsoft Purview Compliance Center. Updated Titles and workshop direct link.
Summary
Microsoft Power Apps Canvas Apps provide users the ability to quickly create and publish applications to their enterprise. With this ability comes concerns with governance to ensure users are allowed the appropriate permissions as well as identifying and highlighting specific apps across the organization.
This article will build off of Canvas Apps - Auditing and Activity Part 1to examine how to search and store audit and activity logs for Canvas Apps. This includes how to turn on auditing, how to use the Purview CompliancePortal, the Unified Audit Log PowerShell command and the Office 365 Management Activity API. We will conclude with thoughts on monitoring tools such as Azure Sentinel, and storage tools such as Cosmos DB and Azure Blob Storage.
Searching the Unified Audit Log
Searching the Unified Audit Log can be performed both manually and with automation. Manually there is a portal called the Microsoft Purview CompliancePortal that provides a centralized area for auditing all Office 365 services including the Power Platform. If automation is desired, the Unified Audit Log offers both a PowerShell module and an API which can be subscribed to. This section covers all three of these in detail.
TheMicrosoft Purview Compliance Portal
Accessing the Office 365 Audit Reports
To begin using the Office 365 Unified Audit Log, your organization will need to have at minimum a specific Office 365 or Microsoft 365 license. Currently the minimum license is the E3 license. The type of license will impact the retention of the logs, E3 is for 90 days while the E5 license retains for a year by default. To turn on, click the "Turn on auditing" button. If an error message occurs, most likely its due to licensing.
Users will need to be an Office 365 Global Administrator or be a member of one or morePurview Compliance Center role groups. To provide a user access to the Security and Compliance Center, use the Office 365 Admin Center and open the Admin center for Compliance. Alternatively, you can directly access the permissions page from here. The permission needed is "View-Only Audit Logs" or "Audit Logs" which allows for viewing and exporting of audit reports.
Navigating theMicrosoft Purview Compliance Center Portal
The PurviewCompliance Center, found at https://protection.office.com, can be used by security analysts to manually search for specific events using a portal user interface.
As shown in the image above, a single or multiple activities performed on aCanvas App can be chosen for analysis. To begin our search, run an audit log search by specifying the activities, the time range and optional search parameters such as users or site. Once the search is complete, review the results in the portal. The results are maxed out at the most 5000 newest events and are incremented 150 records at a time.
Below is an image showing a drill down into the Launched app audit record.
Here is an image showing where I edited the App permissions to allow Everyone in my organization access to view:
The Object Id within Azure Active Directory:
PowerShell
InPowerShellthe Search-UnifiedAuditLog, part of the Exchange Online PowerShell V2 module, is used for Office 365 services including Power Apps Canvas and Model Driven Apps. For Canvas Apps there exist a record type called "PowerAppsApp" that will scope to only logs from Canvas Apps. Using the events listed in the Power Apps logging documentation, here are the PowerShell Operation equivalents to each captured event:
Event | PowerShell Operation |
---|---|
Created app | CreatePowerApp |
Launched app | LaunchPowerApp |
Marked app as Featured | MarkPowerAppAsFeatured |
Restored app version | PromotePowerAppVersion |
Edited app | UpdatePowerApp |
Published app | PublishPowerApp |
Edited app permission | PowerAppPermissionEdited |
Deleted app | DeletePowerApp |
Marked app as Hero | MarkPowerAppAsHero |
Deleted app permission | PowerAppPermissionDeleted |
To use the Search-UnifiedAuditLog, connect using the Connect-ExchangeOnline cmdlet. This is a replacement for using the New-PSSession, however currently creating this session will also work.
Import-Module ExchangeOnlineManagement $UserCredential = Get-CredentialConnect-ExchangeOnline -Credential $UserCredential
NOTE: Please refer to the section "Important Notes on the Exchange Online Module" for important authentication considerations.
The below PowerShell command uses the Search-UnifiedAuditLog to search for any activities related to Canvas Apps. To specify this, use the -RecordType argument with the value "PowerAppsApp".
$endDate = Get-Date$startDate = $endDate.AddDays(-7) #Search last 7 daysSearch-UnifiedAuditLog -StartDate $startDate -EndDate $endDate -RecordType PowerAppsApp
As the image above shows, this will bring back all activities related to Canvas Apps. Depending on what type of audit record you're looking for, the search can be filtered using the Operation argument.
Example of searching for Canvas App creation events:
Search-UnifiedAuditLog -StartDate $startDate -EndDate $endDate -RecordType PowerAppsApp -Operation "CreatePowerApp"
Example of searching for Canvas App launch events:
Search-UnifiedAuditLog -StartDate $startDate -EndDate $endDate -RecordType PowerAppsApp -Operation "LaunchPowerApp"
Each operation can also be filtered down to the specific user using the -UserIds argument. Consider the below script for filtering launch events for a specific user:
Search-UnifiedAuditLog -UserIds "user@tenant.onmicrosoft.com" -StartDate $startDate -EndDate $endDate -RecordType "PowerAppsApp" -Operations "LaunchPowerApp"
Each record returned includes the data of the audit, the user and the data collected within the AuditData property. The app and environment properties are available within this property which can be extracted and stored for contextual information to a log data store. For help working with the AuditData property, consider using with the "ConvertFrom-Json" cmdlet.
$AuditData = ConvertFrom-Json -InputObject $_.AuditData
Azure Automation allows for the use of running PowerShell runbooks in Azure. Here is an example image of the output from running the Search-UnifiedAuditLog in Azure Automation:
One of the benefits of Azure Automation is the ability to schedule the execution of our script. The image below shows the recurrence based on a schedule created.
Another benefit is thenative integration with Azure Log Analytics.This integration will come in handy further in this article.
Kusto Query:
AzureDiagnostics | where StreamType_s == "Output" | project TimeGenerated, ResultDescription
Important Notes on the Exchange Online Module
NOTE: I want to point out verbiage that exists on the Search-UnifiedAuditLog page referring to programmatically downloading data from the audit log:
If you want to programmatically download data from the Office 365 Audit Log, we recommend that you use the Office 365 Management Activity API instead of using the Search-UnifiedAuditLog cmdlet in a PowerShell script. The Office 365 Management Activity API is a REST web service that you can use to develop operations, security, and compliance monitoring solutions for your organization. For more information, see Office 365 Management Activity API reference.
The above is important to point out that the current Exchange Online modules rely on Basic authentication. This is a major concern as it requires either a user to interactively login or to supply credentials as a username and password stored somewhere like Azure Key Vault.
Office 365 Management Activity API
Another way to automate delivery of audit data is by use of the Office 365 Management Activity API. To begin using the API, an App Registration needs to be created in Azure Active Directory. The App Registration will need to have permissions to the Office 365 Management APIs, scoped to the ActivityFeed.Read permission. Once created, the App Registration can be used to get an access token for working with the API subscriptions and blobs. The below image shows the authentication flow and a single request to the API.
Now that the authentication mechanism is in place, we will have to tell the Office 365 Management API which activities we are interested in. This, in my opinion, is where I hope to see the API achieve filter parity with the PowerShell or Portal for the Unified Audit Log. For Power Apps Canvas Apps, there is no way to filter to the specific workload like what is available in the Portal or through PowerShell. This means we have to subscribe to a general bucket of events called Audit.General.
To get the authorization token and create the subscription I used Postman. I've included my sample Postman collection here which shows how to get an authorization token, to start a subscription, as well as poll for notifications.
As stated in the documentation, a subscription needs to be created for Audit.General. Each tenant you intend to monitor will need its own subscription. Once created, the subscription can be used to poll for events or as a webhook to have notification delivered when events are ready. NOTE: Subscriptions can take up to 12 hours before the content blobs are available.
For the webhook I followed a really great article by Amreek Singh that covers how to setup a subscription and webhook to deliver to Cosmos DB for storing and analysis. Included in his article are Power Automate flow examples that can be used to learn more. The example does not include the authorization token and I'm including this as an addition to his flows.
When receiving a notification, an array of content blobs will be delivered. Here's an example of a content blob notification:
{
"contentUri": "https://manage.office.com/api/v1.0/1557f771-4c8e-4dbd-8b80-dd00a88e833e/activity/feed/audit/$audit_general$Audit_General$na0045",
"contentId": "$audit_general$Audit_General$na0045",
"contentType": "Audit.General",
"contentCreated": "2020-04-20T21:43:05.262Z",
"contentExpiration": "2020-04-27T21:40:03.973Z"
}
From what I've seen, each blob contains around 10-15 minutes worth of audits but this could vary depending on the activity captured. Below is an image of the frequency of delivery to the webhook to my flow.
Managing, Archiving and Retaining Events
Utilizing Azure Log Analytics or Azure Application Insights offers native integration with additional monitoring tools to help detect anomalies. Tools such as Azure Sentinel, offering a Security Information Event Management (SIEM) and Security Orchestration Automated Response (SOAR), or Azure Monitoring, offering analysis detection solutions, are perfect for this.
As stated above, based on the license type, audit logs are retained from 90 days to one year. However, business requirements may dictate a long term solution that could cover multiple years of audit activity. Regardless which mechanism to extract data, be it from the Portal or through PowerShell or the API, archiving these audits is a key requirement for most organizations. Each of these tools provide us capabilities to integrate these logs into a centralized data store such as Azure Blob Storage or Cosmos DB for long term retention.
This topic has a considerable amount of impact in your organization's strategy. A future article will cover this topic in more detail, and when published, I'll link from here.
Advanced Audit in Microsoft 365
A recent addition to the compliance tooling within Office 365 is the Advanced Audit feature. Currently I do not see anything specific to the Power Platform but this may change in the future. The key call out I see from the documentation is the ability to retain audit logs from one year and the high bandwidth accessibility for the Office 365 Management Activity API.
The other call out, is the throttling which is capped at 2,000 requests per minute.
Next Steps
In this article we have covered the Unified Audit Logs and what activities are currently captured for Power Apps Canvas Apps. Discussed were techniques to view the audit logs within the Microsoft PurviewCompliance Portal as well as automated techniques using subscriptions and webhooks as well as automating PowerShell using Azure Automation. Consider the combination of using the Unified Audit Log to notify of events happening and the Power App Administration cmdlets to apply security and enrich audits from the audit log.
This article is designed to supplement the article on Power App Analytics, which provides more of an all up view of Canvas App usage. Combining these two documents, an administrator can now track analytic metrics as well as the events that define those metrics.
If you are interested in learning more about specialized guidance and training for monitoring or other areas of the Power Platform, which includes a monitoring workshop, please contact your Customer SuccessAccount Manager or Microsoft representative for further details.
Your feedback is extremely valuable so please leave a comment below and I'll be happy to help where I can! Also, if you find any inconsistencies, omissions or have suggestions, please go here to submit a new issue.
Index
Monitoring the Power Platform: Introduction and Index
FAQs
How do I find the Audit log in PowerApps? ›
You can review your audit data in the Microsoft Purview compliance portal. See Search the audit log in the compliance Center. To use the preconfigured Power Apps reports, go to https://protection.office.com > Search & investigation > Audit log search and select the Power Apps app activities tab.
How do you Audit power apps? ›Enable auditing
Or, from the Power Apps Home Page, select Settings (gear icon) > Advanced settings > Settings > Auditing > Global Audit Settings.
Author's Note: Click on each image for additional clarity. Open the Monitoring Tool by going to the Advanced pane in the left hand side of the Canvas App maker portal. Clicking the link will open a new tab and launch the Monitoring tool.
How can I improve my power app performance? ›- Load Multiple Datasets Concurrently.
- Write Formulas That Use Delegation.
- Cache Data In Collections And Variables.
- Limit The Size Of Collections.
- “Batch Patch” Multiple Changes To A Datasource Table At Once.
- Reduce Code In The App's OnStart Property.
Press Windows key + R to open the Run dialog. In Run, type perfmon and click OK. The Performance Monitor utility will launch—select Performance Monitor from the list on the left and view real-time performance stats.
How do you test audit logs? ›To efficiently analyze audit logs, the logging tool must be able to parse raw log data into structured data that contains the relevant information (e.g., event name, event description, user ID, etc.). Once parsed, an audit logging tool should also make it easy to search for specific audit logs using tags.
How do I query audit log? ›- In Object Explorer, expand the Security folder.
- Expand the Audits folder.
- Right-click the audit log that you want to view and select View Audit Logs. This opens the Log File Viewer -server_name dialog box. For more information, see Log File Viewer F1 Help.
- When finished, click Close.
The activity log includes information like when a resource is modified or a virtual machine is started. Audit Logs - All resource logs that record customer interactions with data or the settings of the service.
What are the 6 major components of power apps? ›The six major components of PowerApps are a gallery, screen, card, control, property, and function.
How do you audit user activity? ›Navigate to Windows Settings -> Security Settings -> Advanced Audit Policy Configuration -> Audit Policy -> Logon/Logoff. Under that, enable Success and Failure auditing for Audit Logon, Audit Logoff, and Audit other logon/logoff events.
Can canvas track app activity? ›
Canvas Analytics tracks interactions from both web browsers and Canvas mobile apps.
How do I debug Power Apps canvas app? ›- Open the app that you want to debug in the PowerApps Studio.
- Click on the “Settings” gear at the top of the screen.
- Make Sure that the toggle is on for the “Formula-level error management” option.
- Courses on the global navigation menu, next click on All Courses.
- On the next page you can customize what appears on your Dashboard. ...
- If you'd like to add a course, add back the star by clicking on it. ...
- You should be able to view your changes on the Dashboard.
In the "App checker" the suggested limit per screen is 300.
What is the maximum number of screens in Power Apps? ›There is no limit on how many contorls or number of screens, but there is limit on app size. And what matters the most of app size in the media size in today's experience, which includes audio, pictures and videos uploaded to your app. 60 mb is a good size to keep considerting the performance.
How do I know if my monitor is getting enough power? ›If the monitor is flashing or displaying dots and lines when it shouldn't be, the computer may not be getting enough power from the power supply unit. The insufficient power can cause the CPU and graphics card to render screen displays inconsistently.
How do I make sure my monitor is at the right refresh rate? ›- Select Start > Settings > System > Display > Advanced display .
- Next to Choose a refresh rate, select the rate you want. The refresh rates that appear depend on your display and what it supports. Select laptops and external displays will support higher refresh rates.
- Images are distorted or fuzzy. If you're noticing that images on your monitor are starting to look distorted or fuzzy, it's a sign that the display is going bad. ...
- Colors are inaccurate. ...
- Screen flickering. ...
- Dead pixels. ...
- Slow response time. ...
- Ghosting. ...
- Vertical lines. ...
- Noise.
There are typically two kinds of audit records, (1) an event-oriented log and (2) a record of every keystroke, often called keystroke monitoring. Event-based logs usually contain records describing system events, application events, or user events.
What is the best practice for log retention? ›Centralize Your Logs
That's why the most important log retention best practice is to archive logs into a central repository, such as a security information and event management (SIEM) platform. A SIEM not only collects logs, but it correlates logs and other security-related documentation for analysis.
How often should audit logs be reviewed? ›
Reviewing logs every day is recommended. If you review logs daily, you will catch issues sooner and prevent them from becoming major incidents. This should be done on a rotating basis by the security team to prevent fatigue from diminishing the quality of the work, or via automated methods to reduce fatigue.
What shows up in audit log? ›An audit log keeps track of information regarding who accessed the system, what they looked at, and what actions they took. This temporal information is important to proving compliance and security.
What is the audit log display? ›Audit log has records providing information about who has accessed the system and what operations he or she has performed during a given period of time. Audit logs are useful both for maintaining security and for recovering lost transactions.
What should audit logs contain? ›- Operating System(OS) Events. start up and shut down of the system. ...
- OS Audit Records. log on attempts (successful or unsuccessful) ...
- Application Account Information. successful and failed application authentication attempts. ...
- Application operations.
Access Audit Logs
In the left-hand navigation pane, the user should select the option labeled “Audit Logs”. This will bring up a list of audit logs. The user can then select the logs they wish to delete and use the delete option to remove them from the app.
As a general rule, storage of audit logs should include 90 days “hot” (meaning you can actively search/report on them with your tools) and 365 days “cold” (meaning log data you have backed up or archived for long-term storage). Store logs in an encrypted format. See our post on Encryption Policies for more information.
Where are auditd logs? ›By default, the Audit system stores log entries in the /var/log/audit/audit. log file; if log rotation is enabled, rotated audit. log files are stored in the same directory.
How long do audit logs last? ›SOX: The Sarbanes-Oxley Act (SOX) concerns corporations active in the United States and requires them to keep audit logs for seven years.
Do audit logs expire? ›Audit logs now expire on that schedule. This operation can be expensive and cause extra database load if you have a lot of audit log items. Ensure that you pick a suitable time and set maximum run time limits so the expiry only happens in the least busy periods for your Jira instance (e.g. on the weekends).
What control is audit log an example of? ›Audit trails are considered a passive form of detective security control.
What are the 4 components of Power Platform? ›
Power platform has 4 primary components - Power BI, Power Apps, Power Automate and Power Virtual Agents.
What are the two types of Power Apps? ›There are two main types of Power Apps: Canvas apps and Model-driven apps. Previously, Power Apps Portals would have fallen under this category. Microsoft have since released Power Pages, a standalone product that has evolved from the functionality of Power Apps Portals.
What three components to Power Apps fall under? ›In this article
Power Apps is a suite of apps, services, and connectors, as well as a data platform, that provides a rapid development environment to build custom apps for your business needs.
The following actions are typically audited: Changes to user authorization. Creation or deletion of database objects. Authentication of users.
What are the stages of audit activity? ›Internal audit conducts assurance audits through a five-phase process which includes selection, planning, conducting fieldwork, reporting results, and following up on corrective action plans.
What are audit activities? ›It can be described as a documented activity performed to verify, by examination and evaluation of objective evidence, that applicable elements of the system are appropriate and effective and have been developed, documented, and implemented in accordance and in conjunction with specified requirements.
Can professors see my activity on Canvas? ›“But if they use the integrated video system in Canvas to, say, post a lecture, faculty can see which students have viewed it, how much of the video they watched, and if they rewatched a video,” Casey says.
Does Canvas detect cheating? ›Just like the supervisor of a physical classroom, the software acts as a neutral examiner. Canvas not just detects and prevents cheating during tests but also verifies the authenticity of the user by validating their ID.
Is Canvas activity log accurate? ›Canvas provides a Quiz Log for every student's quiz attempt. While Canvas does not quantify or guarantee the accuracy of these logs, they may provide some insight into each student's interaction with the quiz.
What data sources does Power Apps canvas use? ›In Power Apps, most canvas apps use external information stored in cloud services called Data Sources. A common example is a table in an Excel file stored in OneDrive for Business. Apps access these data sources by using Connections.
How do I make my canvas app responsive Power Apps? ›
Go to Power Apps. Open the app where you want to use the responsive layout. Go to Settings > Display to disable Scale to fit, Lock aspect ratio, and Lock orientation and select Apply.
How do I monitor student activity on Canvas? ›- In your Canvas course, click the People link.
- The People page, you can see a list of all of your students. In the Last Activity column, you can find the date and time they last logged into your course.
The Dashboard is the first thing you will see when you log into Canvas. The Dashboard helps you see what is happening in all your courses and allows you to figure out what to do next. You can return to your User Dashboard at any time by clicking the Dashboard link in the Global Navigation menu on the left.
What are the three different viewing options for the Canvas dashboard? ›View Dashboard
The Dashboard is your landing page in Canvas. Depending on your institution, your Dashboard may default to one of three views: Card View, List View, or Recent Activity View.
With Energy Tracker, you can easily add, manage and evaluate meter readings. You can simply record your consumption of electricity, water, gas and heat.
Can you use an accessibility checker for Power Apps? ›Find accessibility issues
In the upper-right corner of Power Apps Studio, select the icon for the App checker. In the menu that appears, select Accessibility. A list of issues appears, sorted first by severity and then by screen. Select the arrow next to an item to show details about it.
After buying a wattmeter (we suggest Amazon, Newegg, or your local computer store), plug it into the wall, and then plug your desktop or laptop power cord into it. The built-in screen displays how much power your computer uses in real-time.
How do I monitor app usage? ›- Open your phone's Settings app.
- Tap Digital Wellbeing & parental controls.
- The chart shows your phone use today. For more info, tap the chart. For example: Screen time: What apps you've had on screen and for how long. ...
- To get more info or change app settings, tap a listed app.
PUE (Power Usage Effectiveness) is an indicator for measuring the energy efficiency of a data centre. In other words, PUE evaluates the energy performance of the data center by calculating the ratio of the energy used as a whole as compared with the energy used by just the IT equipment alone.
Are apps built in Power Apps Hipaa compliant? ›RELATED: Is Microsoft Exchange HIPAA compliant? And according to the HIPAA Azure web page, Microsoft Power Apps is covered by its BAA and therefore can be HIPAA compliant.
Who can view Power Apps? ›
Admins and users with the Guest Inviter role can add guests to a tenant. To access an app that doesn't connect to Dataverse, the guest user must have a license with Power Apps use rights that matches the capability of the app assigned through one of the following tenants: The tenant hosting the app being shared.
Can Power Apps scan barcode? ›Download Power Apps Mobile on your phone. Open the Power Apps app, and sign in. Select and open the barcode reader app. Select Scan, and scan any barcode label (for example, barcode label on a book).
How do I monitor power consumption in Windows? ›To monitor the power usage of apps, open task manager. Either right-click the taskbar and choose Task Manager or hit the Windows key type: type: task manager and hit Enter. After it launches, click the Processes tab, and you should see a couple of new columns labeled “Power usage” and “Power usage trend.”
What power consumption means? ›Power consumption is the amount of energy used per unit time. Power consumption is of great importance in digital systems. The battery life of portable systems such as cell phones and laptop computers is limited by power consumption.
What is power supply tracking? ›A tracking power supply is a power supply that regulates its output voltage to another voltage or signal. For most op amps, the positive supply voltage always should of equal magnitude and opposite polarity compared to the negative power supply.
How can I see other phones activity on my phone? ›- On your Android phone or tablet, open your device's Settings app Google Manage your Google Account.
- At the top, tap Data & privacy.
- Under "History settings," tap My Activity.
- Above your activity, in the search bar, tap More Other Google Activity.
- FamiSafe App Usage Tracker [Available for iOS & Android ]
- Save My Time App Usage Tracker.
- Phone Usage Time Tracker.
- Behind Android Usage Tracker.
- PhoneUsage Tracker.