Interpreting Activity Logs
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Lesson: Mastering Activity Logs in Microsoft Defender for Cloud Apps
Introduction: Why Activity Logs Are the Pulse of Your Security Operations
In the modern digital workspace, where employees operate from various locations, devices, and applications, the perimeter of the corporate network has effectively dissolved. Security professionals can no longer rely on traditional firewall logs to monitor internal traffic. Instead, the focus has shifted toward Cloud Access Security Brokers (CASB), such as Microsoft Defender for Cloud Apps, which act as the central nervous system for monitoring interactions between users and cloud services.
At the heart of this monitoring capability lies the Activity Log. An activity log is a detailed, chronological record of every action performed by users within your connected cloud applications. Whether a user is downloading a sensitive file from SharePoint, changing a permission setting in Salesforce, or logging into an unauthorized third-party application, these actions are captured, indexed, and made available for analysis.
Understanding these logs is not just a routine administrative task; it is the cornerstone of proactive threat hunting and incident response. Without a deep grasp of how to interpret these logs, security teams are essentially flying blind, reacting only after a breach has occurred rather than identifying the subtle, anomalous behaviors that precede a full-scale security incident. This lesson will guide you through the anatomy, interpretation, and strategic application of activity logs to ensure your organization’s cloud environment remains secure and compliant.
Not read yet
The Anatomy of an Activity Log
To effectively manage security, you must first understand what information is contained within an activity log. Each entry in Microsoft Defender for Cloud Apps is a structured data object that provides context to a specific user action. By breaking down these fields, you can begin to see the story behind every click, upload, and sign-in.
Core Data Fields
Every activity log entry typically contains the following essential information:
- User/Actor: This identifies the identity performing the action. It includes the user's principal name (UPN), their role, and sometimes their department or location.
- Application: The cloud service where the activity occurred (e.g., Microsoft 365, Box, GitHub, or an unsanctioned application).
- Activity Type: The specific action performed. Examples include "File Download," "User Login," "Permission Change," or "Delete Object."
- Timestamp: The exact date and time the activity was recorded. This is crucial for reconstructing the timeline of an event.
- IP Address and Location: The source of the request. This provides geographic context, which is vital for identifying impossible travel scenarios or access from high-risk regions.
- Device Info: Details about the operating system, browser, and whether the device is managed or compliant with your organization's policies.
- Object/Resource: The specific file, folder, or setting that was interacted with. This allows you to track sensitivity levels of the data involved.
Callout: Logs vs. Alerts It is important to distinguish between raw activity logs and security alerts. Activity logs are the comprehensive, unfiltered record of everything happening in your environment. Security alerts are a subset of these logs that have triggered a pre-defined policy or anomaly detection rule. While alerts require immediate action, logs are the investigative playground where you find the context needed to resolve those alerts.
Not read yet
Practical Interpretation: Step-by-Step Analysis
Interpreting logs is an iterative process. You rarely look at a single log entry in isolation; rather, you filter and pivot through logs to build a narrative. Here is a practical approach to analyzing activity patterns.
Step 1: Establishing a Baseline
Before you can identify a threat, you must understand what "normal" looks like. Use the activity log filters to view the daily behavior of a specific user or department. Look for their typical working hours, the devices they use, and the types of files they regularly access. When you know the baseline, deviations become immediately apparent.
Step 2: Filtering for Anomalies
Use the advanced filters in the Defender for Cloud Apps portal to isolate suspicious activity. Common filters include:
- Activity Type: Search for high-risk activities like "Mass download," "External sharing," or "Administrative configuration change."
- Location: Filter for logins from countries where your organization does not conduct business.
- Device: Filter for activity coming from non-compliant or unknown devices.
Step 3: Pivoting and Contextualizing
Once you find a suspicious entry, don't stop there. Click on the user's name to view their full activity history. If a user downloaded 500 files at 3:00 AM from an unknown IP address in a different country, you have likely identified a compromised account or an insider threat. Always cross-reference the activity log with sign-in logs from Microsoft Entra ID to confirm the authentication method used.
Tip: Use KQL for Deeper Insights For advanced users, exporting logs to a Log Analytics workspace allows you to run Kusto Query Language (KQL) queries. This enables complex correlation, such as joining sign-in logs with file activity logs to see exactly what a user did immediately after a suspicious login attempt.
Not read yet
Real-World Scenarios and Examples
To master log interpretation, you must apply your knowledge to realistic scenarios. Below are three common situations security teams encounter.
Scenario 1: The "Impossible Travel" Alert
An alert triggers because a user logged in from London, and then logged in from Singapore two hours later.
- The Log Interpretation: You examine the activity logs for the two logins. You see that the London login used a corporate-managed laptop, while the Singapore login used an unmanaged mobile device. Furthermore, the Singapore session shows a series of rapid file downloads from a sensitive SharePoint site.
- The Conclusion: This is a clear indicator of a session hijacking or credential theft. The second login is not a legitimate user action, and the rapid file downloads suggest data exfiltration.
Scenario 2: Unauthorized External Sharing
A user shares a sensitive document containing customer PII (Personally Identifiable Information) with an external email address.
- The Log Interpretation: You filter the logs by "External Sharing" and "File Created." You find the specific user account and the exact time the sharing permission was modified. By looking at the file metadata, you confirm the document's classification label is "Confidential."
- The Conclusion: While this might be a legitimate business process, it violates your data governance policy. You can now reach out to the user to confirm the intent or automatically revoke the sharing link using a governance action.
Scenario 3: Mass Data Deletion
A user deletes a large number of files within a short window, triggering a "Mass delete" alert.
- The Log Interpretation: You review the logs and see that the user deleted 2,000 files in under 30 seconds. You investigate the user's history and notice they were recently added to a "Departing Employees" group in your HR system.
- The Conclusion: This is a classic case of an offboarding risk. The user is attempting to sabotage or remove data before their access is revoked.
Not read yet
Best Practices for Managing Logs
Maintaining a clean and useful log environment requires discipline. Follow these industry-standard practices to ensure your logs remain an asset rather than a liability.
1. Implement Strict Data Retention Policies
Do not store logs indefinitely unless required for compliance. Excessive logs increase costs and make searching slower. Align your retention periods with your organizational data protection requirements (e.g., GDPR or HIPAA).
2. Leverage Automated Governance
Use the governance actions built into Defender for Cloud Apps. If you frequently see the same "bad" behavior in your logs—such as users sharing files with personal email addresses—create a policy to automatically block that specific activity. This reduces the manual workload of reviewing logs.
3. Regularly Review Policy Effectiveness
Logs will tell you if your policies are working. If you have a policy to block "Impossible Travel" but your logs show many false positives, you may need to adjust the sensitivity of the detection or whitelist known VPN exit nodes that cause these alerts.
4. Monitor Administrative Actions
Administrative logs are the most sensitive logs in your environment. Any change to a policy, a user's role, or a configuration setting should be scrutinized. Create a dedicated dashboard or alert specifically for administrative activity to prevent "privilege creep" or malicious configuration changes.
Warning: The "Log Blindness" Trap A common mistake is to ignore logs that don't trigger an alert. Many subtle attacks—like an attacker slowly downloading small amounts of data over several weeks—will never trigger a "Mass Download" alert. Periodically perform "threat hunting" exercises where you manually review logs for users who have not triggered any alerts but show unusual patterns of behavior.
Not read yet
Common Pitfalls and How to Avoid Them
Even experienced security professionals fall into traps when analyzing logs. Being aware of these pitfalls can save you hours of investigation time.
Ignoring the "Why"
Logs tell you what happened, but they rarely tell you why. Never assume malicious intent without context. A user downloading 1,000 files might look like an exfiltration event, but it could also be a legitimate user syncing their files for an offline trip. Always verify with the user or their manager before taking punitive actions.
Over-Reliance on Default Filters
Default views are useful, but they are designed for the average user. Sophisticated attackers know how to blend in with normal traffic. Learn to create custom views that focus on the specific data sets relevant to your industry and your organization's specific risk profile.
Failure to Correlate Across Sources
Defender for Cloud Apps is powerful, but it is not the only source of truth. If you see suspicious activity, check other logs:
- Endpoint Detection and Response (EDR): Check if the device itself shows signs of malware.
- Network Firewall Logs: Check if the user's connection originated from a known malicious IP.
- Identity Protection Logs: Check if the user's identity has been flagged for other suspicious sign-ins.
Not read yet
Comparison: Manual Log Review vs. Automated Alerts
| Feature | Manual Log Review | Automated Alerts |
|---|---|---|
| Purpose | Deep investigation and hunting | Immediate notification of known threats |
| Effort | High (requires human analysis) | Low (system-driven) |
| Speed | Slow (reactive/proactive) | Fast (real-time) |
| Context | High (full visibility) | Low (focused on the specific trigger) |
| Outcome | Discovering patterns/unknown threats | Mitigating known risks |
Technical Implementation: Connecting and Configuring
To ensure you are getting the logs you need, you must properly connect your cloud applications to Microsoft Defender for Cloud Apps.
Step 1: Connecting Apps via API
Most major cloud services (Microsoft 365, Google Workspace, Salesforce) provide APIs that allow Defender for Cloud Apps to pull logs in real-time.
- Navigate to Settings in the Defender for Cloud Apps portal.
- Select Connected apps and then App connectors.
- Click the plus icon (+) to add a new connector.
- Follow the specific authentication instructions for the application (this usually involves OAuth tokens).
Step 2: Enabling Log Collection
Once the connector is established, ensure that "Activity logs" are enabled. Some applications require you to enable "Audit Logging" within the application's own settings before the connector can ingest the data.
Step 3: Verifying Data Ingestion
After connecting an app, it can take a few minutes to a few hours for the first logs to appear. You can verify this by going to the Activity log page and checking if the "App" filter shows the new application. If no logs appear after 24 hours, re-check your connector credentials and ensure the application's API limits haven't been exceeded.
Not read yet
Advanced Analysis: Using KQL for Log Investigation
While the portal UI is excellent for day-to-day tasks, Kusto Query Language (KQL) is the secret weapon for power users. When you export your logs to a Log Analytics workspace, you can perform queries that are simply not possible through the standard interface.
Example Query: Identifying "Low and Slow" Exfiltration
This query looks for users who have downloaded more than 50 files per day over a period of 7 days, which might indicate a slow, methodical data theft.
CloudAppEvents
| where ActivityType == "FileDownloaded"
| summarize Count = count() by bin(TimeGenerated, 1d), AccountDisplayName
| where Count > 50
| summarize DaysExceeding = count() by AccountDisplayName
| where DaysExceeding >= 7
Explanation of the query:
CloudAppEvents: This is the base table containing all activity logs.where ActivityType == "FileDownloaded": We filter for only the download action.summarize Count = count() by bin(TimeGenerated, 1d), AccountDisplayName: We group the downloads by user and by day.where Count > 50: We isolate the days where the user exceeded our threshold.summarize DaysExceeding = count() by AccountDisplayName: We count how many days each user crossed that threshold.where DaysExceeding >= 7: We identify only those users who consistently hit that threshold for a full week.
This type of query is invaluable for identifying threats that standard alert thresholds might miss.
Not read yet
Compliance and Auditing Considerations
In many industries, the activity log is a legal requirement. Auditors will look for evidence that you are monitoring and retaining logs of administrative actions and sensitive data access.
- Audit Trails: Ensure that your logs include "who, what, when, and where." If an auditor asks who deleted a specific file, you must be able to produce the log entry that shows the user identity, the timestamp, and the action taken.
- Immutable Logs: For highly regulated industries, consider using write-once-read-many (WORM) storage for your exported logs to ensure they cannot be tampered with by an attacker looking to hide their tracks.
- User Privacy: Be mindful of privacy laws (like GDPR). While you need to monitor activity, ensure that you are not collecting unnecessary personal information that isn't required for security purposes. Communicate to your employees that their corporate activity is being monitored as part of the company's security policy.
Not read yet
Frequently Asked Questions (FAQ)
Q: Why don't I see logs for a specific application? A: First, verify the App Connector status in the "Connected apps" settings. If the connector is active, check the application's internal settings to ensure "Audit logs" or "Unified logging" is enabled. Some SaaS providers require a specific license tier to expose audit logs via API.
Q: Can I see logs for users who aren't in my tenant? A: Generally, no. Defender for Cloud Apps monitors activities within your managed environment. If an external user interacts with your shared files, you will see their activity, but it will be linked to the guest account identity in your tenant.
Q: How long does it take for an activity to appear in the log? A: Most logs appear within seconds of the action occurring. However, some applications have a delay in their API reporting, which can result in a lag of up to an hour.
Q: What is the difference between an "Unsanctioned" app and a "Sanctioned" app? A: A sanctioned app is one your organization has officially approved and invested in. An unsanctioned app is any application being used by employees that is not on your approved list. Defender for Cloud Apps allows you to monitor both, but you should treat activity in unsanctioned apps with higher suspicion.
Not read yet
Key Takeaways for Security Professionals
- Logs are your primary source of truth: Never rely solely on automated alerts. The raw activity log is where the context of an incident is hidden.
- Establish a baseline: You cannot identify an anomaly if you don't understand the normal behavior of your users and environment.
- Context is king: Always pivot from a single log entry to the user's full history and cross-reference with other identity or endpoint logs.
- Automation is necessary but not sufficient: Use governance policies to handle common, low-risk actions, but reserve human expertise for investigating complex or high-risk behavior.
- KQL is a superpower: Investing time in learning Kusto Query Language will allow you to perform sophisticated threat hunting that standard UI tools simply cannot handle.
- Think like an attacker: Attackers often try to hide in the noise. Periodically hunt for "low and slow" patterns that don't trigger standard alerts.
- Compliance is non-negotiable: Ensure your log retention and auditing practices meet your industry's legal requirements to avoid significant regulatory risk.
By mastering the interpretation of activity logs, you move from a reactive security posture to a proactive one. You gain the ability to spot the "silent" threats and provide the necessary evidence to stop them before they result in a data breach. Treat these logs not as a chore, but as the most valuable diagnostic tool in your security arsenal.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Creating a Microsoft 365 Tenant
- Creating a Microsoft 365 Tenant Quiz5q
- Implementing and Managing Domains
- Implementing and Managing Domains Quiz5q
- Configuring Organization Settings
- Configuring Organization Settings Quiz5q
- Monitoring Microsoft 365 Service Health
- Monitoring Microsoft 365 Service Health Quiz5q
- Configuring Network Connectivity Insights
- Configuring Network Connectivity Insights Quiz5q
- Managing Software Updates in Microsoft 365
- Managing Software Updates in Microsoft 365 Quiz5q
- Monitoring Microsoft 365 Adoption and Usage
- Monitoring Microsoft 365 Adoption and Usage Quiz5q
- Configuring Microsoft 365 Backup
- Configuring Microsoft 365 Backup Quiz5q
- Creating and Managing Users in Microsoft Entra ID
- Creating and Managing Users in Microsoft Entra ID Quiz5q
- Managing External Users and Guest Access
- Managing External Users and Guest Access Quiz5q
- Creating and Managing Contacts
- Creating and Managing Contacts Quiz5q
- Creating and Managing Microsoft 365 Groups
- Creating and Managing Microsoft 365 Groups Quiz5q
- Managing Shared Mailboxes
- Managing Shared Mailboxes Quiz5q
- Managing Microsoft 365 Licenses
- Managing Microsoft 365 Licenses Quiz5q
- Performing Bulk User Management with PowerShell
- Performing Bulk User Management with PowerShell Quiz5q
- Implementing Group-Based Licensing
- Implementing Group-Based Licensing Quiz5q
- Implementing Roles in Microsoft 365
- Implementing Roles in Microsoft 365 Quiz5q
- Managing Microsoft Entra ID Roles
- Managing Microsoft Entra ID Roles Quiz5q
- Managing Permissions for Microsoft Defender XDR
- Managing Permissions for Microsoft Defender XDR Quiz5q
- Managing Delegation with Administrative Units
- Managing Delegation with Administrative Units Quiz5q
- Managing Roles with Privileged Identity Management
- Managing Roles with Privileged Identity Management Quiz5q
- Managing Microsoft Purview Permissions
- Managing Microsoft Purview Permissions Quiz5q
- Preparing for Identity Synchronization
- Preparing for Identity Synchronization Quiz5q
- Using IdFix for Directory Cleanup
- Using IdFix for Directory Cleanup Quiz5q
- Implementing Microsoft Entra Connect Sync
- Implementing Microsoft Entra Connect Sync Quiz5q
- Implementing Microsoft Entra Cloud Sync
- Implementing Microsoft Entra Cloud Sync Quiz5q
- Monitoring with Microsoft Entra Connect Health
- Monitoring with Microsoft Entra Connect Health Quiz5q
- Troubleshooting Synchronization Issues
- Troubleshooting Synchronization Issues Quiz5q
- Implementing Authentication Methods
- Implementing Authentication Methods Quiz5q
- Implementing Self-Service Password Reset
- Implementing Self-Service Password Reset Quiz5q
- Implementing Microsoft Entra Password Protection
- Implementing Microsoft Entra Password Protection Quiz5q
- Investigating Authentication Issues
- Investigating Authentication Issues Quiz5q
- Configuring Passwordless Authentication
- Configuring Passwordless Authentication Quiz5q
- Planning for Identity Protection
- Planning for Identity Protection Quiz5q
- Implementing Microsoft Entra Identity Protection
- Implementing Microsoft Entra Identity Protection Quiz5q
- Planning Conditional Access Policies
- Planning Conditional Access Policies Quiz5q
- Implementing Conditional Access Policies
- Implementing Conditional Access Policies Quiz5q
- Implementing Multifactor Authentication
- Implementing Multifactor Authentication Quiz5q
- Configuring Named Locations
- Configuring Named Locations Quiz5q
- Understanding Microsoft Security Exposure Management
- Understanding Microsoft Security Exposure Management Quiz5q
- Managing Microsoft Secure Score
- Managing Microsoft Secure Score Quiz5q
- Reviewing and Responding to Incidents
- Reviewing and Responding to Incidents Quiz5q
- Using Advanced Hunting in Defender XDR
- Using Advanced Hunting in Defender XDR Quiz5q
- Reviewing Defender XDR Reports
- Reviewing Defender XDR Reports Quiz5q
- Using Microsoft Defender Threat Intelligence
- Using Microsoft Defender Threat Intelligence Quiz5q
- Configuring Custom Detection Rules
- Configuring Custom Detection Rules Quiz5q
- Implementing Threat Policies in Defender for Office 365
- Implementing Threat Policies in Defender for Office 365 Quiz5q
- Configuring Alert Policies
- Configuring Alert Policies Quiz5q
- Investigating Email and Collaboration Threats
- Investigating Email and Collaboration Threats Quiz5q
- Managing Attack Simulation Training
- Managing Attack Simulation Training Quiz5q
- Managing Restricted Entities
- Managing Restricted Entities Quiz5q
- Onboarding Devices to Defender for Endpoint
- Onboarding Devices to Defender for Endpoint Quiz5q
- Configuring Endpoint Settings
- Configuring Endpoint Settings Quiz5q
- Using Vulnerability Management Dashboard
- Using Vulnerability Management Dashboard Quiz5q
- Responding to Endpoint Vulnerabilities
- Responding to Endpoint Vulnerabilities Quiz5q
- Managing Automated Investigation and Remediation
- Managing Automated Investigation and Remediation Quiz5q
- Configuring App Connector for Microsoft 365
- Configuring App Connector for Microsoft 365 Quiz5q
- Configuring Cloud Apps Policies
- Configuring Cloud Apps Policies Quiz5q
- Interpreting Activity Logs
- Interpreting Activity Logs Quiz5q
- Configuring Cloud App Discovery
- Configuring Cloud App Discovery Quiz5q
- Responding to Cloud App Discovery Issues
- Responding to Cloud App Discovery Issues Quiz5q
- Implementing Sensitive Information Types
- Implementing Sensitive Information Types Quiz5q
- Using Keywords and Regular Expressions
- Using Keywords and Regular Expressions Quiz5q
- Implementing Retention Labels and Policies
- Implementing Retention Labels and Policies Quiz5q
- Implementing Sensitivity Labels and Policies
- Implementing Sensitivity Labels and Policies Quiz5q
- Monitoring Label Usage with Content Explorer
- Monitoring Label Usage with Content Explorer Quiz5q
- Using Activity Explorer and Label Reports
- Using Activity Explorer and Label Reports Quiz5q
- Configuring Auto-Labeling Policies
- Configuring Auto-Labeling Policies Quiz5q
- Configuring DLP Policies for Exchange Online
- Configuring DLP Policies for Exchange Online Quiz5q
- Configuring DLP for SharePoint and OneDrive
- Configuring DLP for SharePoint and OneDrive Quiz5q
- Configuring DLP for Teams and Power BI
- Configuring DLP for Teams and Power BI Quiz5q
- Configuring DLP for Microsoft 365 Copilot
- Configuring DLP for Microsoft 365 Copilot Quiz5q
- Configuring Endpoint DLP
- Configuring Endpoint DLP Quiz5q
- Reviewing DLP Alerts and Events
- Reviewing DLP Alerts and Events Quiz5q
- Responding to DLP Reports
- Responding to DLP Reports Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock MS-102 exam-style practice questions.
Practice for MS-102