Skip to content
All projects
Compliance · InvestigationProduction

Microsoft Purview Audit

Unified Audit Log search, insider-threat investigation and evidence export across Microsoft 365.

Microsoft PurviewUnified Audit LogInvestigationCompliance Reporting

Difficulty

Intermediate

Environment

Microsoft 365 / Purview

Deployment

Production

Est. Implementation

1–2 weeks

Related certifications:MS-102
GitHub
Overview

Executive Summary

This project documents an enterprise Microsoft Purview Audit implementation — verifying audit is enabled, running a targeted audit search, investigating a focused insider-threat scenario, and exporting evidence for compliance and forensic use.

Using Audit (Standard), a search scoped to a single user, activity type and three-day window returned 12 FileAccessed events, which were reviewed, exported to CSV with full AuditData JSON, and validated in Excel — demonstrating a repeatable, evidence-producing investigation workflow.

Context

Business Problem

There was no visibility into who accessed sensitive SharePoint documents, no accountability record for file deletions, no systematic review of privileged account actions, and security incidents were investigated reactively without data.

Regulatory auditors require evidence of monitoring controls; without a searchable, exportable audit trail the organisation cannot demonstrate accountability or respond quickly to a suspected incident.

Business Risks

  • No visibility into who accessed sensitive SharePoint documents
  • File deletions occur with no accountability record
  • Privileged account actions not reviewed systematically
  • Security incidents investigated reactively, without data

Compliance Concerns

  • ISO/IEC 27001:2022 monitoring and logging controls
  • GDPR Article 5 accountability requirements
  • Evidence retention for regulatory audits
Approach

Solution Overview

Microsoft Purview Audit (Standard) centralises activity from Exchange Online, SharePoint Online, OneDrive, Teams and Entra ID into the Unified Audit Log, searchable by date range, user, activity type and workload.

A targeted investigation scenario — a single test user's FileAccessed activity over a three-day window — was executed end to end: search, results review, CSV export with full AuditData JSON, and validation of the export in Excel, producing chain-of-custody evidence ready for compliance or legal use.

Design

Architecture

Architecture Diagram
100%

Architecture diagram placeholder

Activity from Exchange, SharePoint, OneDrive, Teams and Entra ID flows into the Unified Audit Log, searchable via Audit Search and exportable to CSV for investigation and compliance evidence.
Stack

Technology Stack

Microsoft Purview Audit

Unified Audit Log search, filters and export

Audit Standard

90-day retention, full search, CSV export (E3/E5)

Exchange Online / SharePoint / OneDrive / Teams

Audited Microsoft 365 workloads

Microsoft Entra ID

Administrator authentication and audit role assignment

PowerShell

Targeted search, bulk export and configuration auditing

Environment

Lab Environment

Tenant
securem365lsb.onmicrosoft.com (Microsoft 365 E5 trial)
Audit Tier
Audit Standard
Test Account
testuser1@securem365lsb.onmicrosoft.com
Investigation Window
2026-07-01 to 2026-07-03
Investigation Scenario
Insider Threat — file access pattern analysis
Events Captured
12 FileAccessed events
Build

Implementation

A phased, expandable walkthrough. Screenshots and evidence can be attached to each phase.

  1. Confirm auditing is enabled and administrator roles are assigned.

    • Navigate to compliance.microsoft.com → Solutions → Audit
    • Confirm auditing status is enabled for the tenant
    • Verify Audit Logs / View-Only Audit Logs roles are assigned
    Screenshots for this phase can be added here.
Automation

PowerShell

Illustrative example snippets — copy or download each script. Production values are placeholders.

Targeted Unified Audit Log search

Search-UnifiedAuditLog.ps1
# Illustrative scaffold based on Search-UnifiedAuditLog.ps1
.\Search-UnifiedAuditLog.ps1 `
  -StartDate "2026-07-01" `
  -EndDate "2026-07-03" `
  -UserIds "testuser1@securem365lsb.onmicrosoft.com" `
  -Operations "FileAccessed" `
  -OutputPath "C:\AuditExports"

Bulk audit export

Export-AuditLogs.ps1
# Illustrative scaffold based on Export-AuditLogs.ps1
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-3) -EndDate (Get-Date) `
  -RecordType SharePointFileOperation |
  Export-Csv -Path .\AuditExports\audit-export.csv -NoTypeInformation
Evidence

Configuration Screenshots

Click any tile to open the lightbox. Real screenshots will replace these placeholders.

Phase 2–3 · Audit Search

Phase 4 · Export Results

Phase 5 · Validation

Proof

Validation

  • Audit Solution Accessible

    Audit accessible at compliance.microsoft.com → Solutions → Audit.

  • Search Executes with Filters

    Date, user and activity filters apply correctly.

  • 12 Results Returned

    Search completes with 12 results for testuser1 FileAccessed.

  • Results Display Correctly

    Activity, User, IP, Date and RecordType fields all visible.

  • Export Succeeds

    Export completes and CSV downloads successfully.

  • CSV Validated in Excel

    All 12 records and AuditData JSON confirmed intact.

Reality

Challenges

Audit is enabled by default — but must be verified

Many organisations assume auditing is active without checking; this was verified explicitly before relying on it for an investigation.

Search scope affects performance

Broad date ranges across all users can be slow; scoping to a specific user, activity and date range returned results faster and was easier to analyse.

Insight

Lessons Learned

  • AuditData JSON is the forensic record — CSV columns are metadata, but AuditData contains the complete activity context.
  • Export early — Audit Standard retains logs for only 90 days; preserve evidence immediately once an incident is identified.
  • Audit Premium is required for mailbox-read events (MailItemsAccessed), which are critical for email breach investigations.
  • Targeted searches (specific user, activity, date range) are faster and easier to analyse than broad searches.
Outcome

Business Impact

12 events in one search

Investigation Time

Chain-of-custody CSV

Evidence Preserved

Searchable audit trail

Improved Accountability

ISO 27001 evidence

Audit-Ready

Capability

Skills Demonstrated

Microsoft Purview AuditUnified Audit Log InvestigationInsider Threat AnalysisEvidence Export & Chain of CustodyPowerShell Audit Automation
Mapping

Related Certifications

Certifications this project maps to are highlighted.

MS-102SC-200SC-300SC-400AZ-900AZ-500SC-100
Reading

Related Blog Articles

Placeholder cards — future TechCertGuide integration.

Source

GitHub Repository

lokeshm-it/Microsoft-Purview-Audit

Public

Unified Audit Log search, investigation workflow and evidence export implementation.

Resources

Download Center

Project Case Study

PDF · Available soon

Architecture Diagram

PDF · Available soon

PowerShell Scripts

ZIP · Available soon

Technical Documentation

PDF · Available soon