Free tech learning for everyone, from basics to pro

Digital ForensicsCyber SecurityIntermediate

Cloud and Microsoft 365 forensics: logs, retention and collecting evidence

In short: Cloud forensics relies mainly on logs, such as sign-in logs, audit logs, Microsoft 365's unified audit log and AWS CloudTrail, plus snapshots of virtual machine disks. Logs are kept only for limited periods, often depending on licence, so investigators must export them quickly. Preparing in advance, with extended retention and practised export steps, makes cloud investigations possible.

How cloud investigations are different

In a traditional investigation, you can seize and image a computer's disk (see disk forensics). In the cloud, there is no disk to seize. The evidence lives in the provider's systems, mostly as logs, and you collect it through admin portals and APIs. The provider also decides how long those logs are kept. These challenges are introduced in forensic tools and modern challenges.

Traditional and cloud forensicsTraditionalSeize the physical diskImage the whole systemEvidence stays on siteInvestigator controls collectionCloudNo physical accessEvidence is mainly logsLogs expire after set periodsDepends on provider tools and APIs
Figure 1. In the cloud, logs are often the main evidence, and they will not wait for you.

Where the evidence is

Key cloud evidence sourcesSign-in logswho logged in, from whereAudit logswhat was changedM365 unified audit logmail, files, TeamsAWS CloudTrailAPI activityAzure activity logresource changesSnapshotscopies of VM disks
Figure 2. Know where these are, how long they are kept and who can export them, before an incident.
  • Microsoft 365: Entra ID sign-in and audit logs show logins, MFA and account changes. The unified audit log records actions in Exchange, SharePoint, OneDrive and Teams, such as mailbox access, inbox rules and file downloads.
  • AWS: CloudTrail records API calls, such as who created a user or changed a security group. VPC Flow Logs show network connections. More detail is in AWS logging and detection.
  • Azure: the activity log records changes to resources, and diagnostic settings can send detailed logs to a workspace.

Retention: the clock is ticking

Cloud logs are not kept forever. Default retention may be short, and longer retention often depends on licences or on sending logs to your own storage or SIEM. If an attacker was active months before discovery, the evidence may already be gone. Good preparation means checking retention settings now, sending important logs to long-term storage, and documenting how to export them. During an incident, export the relevant logs immediately and record hashes of the exported files.

Collecting evidence from cloud systems

  1. Preserve logs first: export sign-in, audit and activity logs for the relevant period.
  2. For virtual machines, take disk snapshots and, if possible, capture memory before shutting anything down.
  3. Use accounts with read-only investigation rights, and record every action you take.
  4. Contain carefully: disabling an account or isolating a VM is usually better than deleting it, which destroys evidence.

Real-world example: a mailbox takeover

A fictional recruitment agency notices that a manager's mailbox has been sending strange emails. The investigator immediately exports Entra sign-in logs and the unified audit log for the last 90 days. The sign-in logs show a successful login from an unfamiliar country after an MFA prompt was approved. The audit log shows the attacker created an inbox rule hiding replies, then downloaded the manager's OneDrive files. Because the agency had extended audit retention as part of its licence, the full timeline back to the first phishing click was available. The evidence showed exactly which files were accessed, which was essential for deciding what to report to clients and regulators.

Practice

What is the main type of evidence in cloud forensics?
Logs, such as sign-in logs, audit logs and API activity logs, plus snapshots of virtual machine disks.
Why is log retention so important?
Cloud logs are kept only for limited periods, so evidence of an older compromise may already be deleted.
Why disable or isolate rather than delete a compromised cloud resource?
Deleting it destroys evidence that may be needed for the investigation.

Key takeaways

  • Cloud forensics relies mainly on logs and snapshots, not seized disks.
  • Know your key sources: sign-in logs, audit logs, M365 unified audit log, CloudTrail.
  • Check and extend log retention before an incident happens.
  • Export logs immediately during an incident and record hashes.
  • Isolate rather than delete compromised resources to preserve evidence.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: