Reading width
Wide uses the full column for everything, text, diagrams, code, and exercises. Narrow keeps the standard reading width.
Text size
Scales the body text. Headings and code blocks keep their size.
In this section
0.6 Sign-ins, Mail and Cloud Audit
Introduction
Most of what a modern office worker does happens in cloud services, and each service keeps its own records. Signing in is recorded by the identity service. A message arriving is recorded by the mail service. Saving a file is recorded by the file service's audit log. An investigation of anything a user did in the cloud, from a phishing email to a suspicious download, means reading those records side by side.
This lesson follows one user's ordinary morning through three Microsoft 365 records: a sign-in, a delivered email and a file upload. Each names the person, the device and the objects involved in its own way. The task is to find the values that genuinely join them, notice one that only appears to, and say what the joined records show. Module 6 investigates phishing and account misuse across exactly these services, so the ground is laid here on a morning where nothing went wrong.
Nothing here needs installing. The records are shown on the page, first as their portals list them and then as the data behind the list, so you can compare the two as lesson 0.1 did.
One Morning, Three Services
A sign-in, a message and a file, each recorded by a different serviceOne morning, three Microsoft 365 services, and the record each step left
The records belong to the same generated organization as lesson 0.1, harborline.example. On Monday 12 October, Maya Ortiz signed in, received an invoice from a supplier, and saved a file to the finance team's SharePoint site, the three numbered steps in the figure.
Each step happened in a different service, and each service wrote its own record. Entra ID, Microsoft's identity service, recorded the sign-in. Exchange Online recorded the message's delivery, which Microsoft's security products expose as the EmailEvents table. SharePoint Online recorded the upload in Microsoft 365's audit log, which a log workspace stores in a table called OfficeActivity.
These three record types are the ones you'll meet most in cloud investigations, and they're built by different teams for different purposes. The sign-in log is built to explain authentication. The mail record is built to explain delivery and filtering. The audit log is built to show who did what to which object. None was designed to be joined to the others, which is why joining them takes care.
Field names make the point quickly. The account is UserPrincipalName in the sign-in, RecipientEmailAddress in the mail record and UserId in the audit log. The time is TimeGenerated in two and Timestamp in the third. The device's address is IPAddress in one and ClientIP in another. Same ideas, different names, as lesson 0.2 found with Windows records.
Times are the first thing to align. All three records here are in UTC. Microsoft's audit log schema describes its record time as Coordinated Universal Time, and the sign-in and mail records use UTC too. That makes ordering easy: the sign-in came first, then the message, then the upload, about twenty-three minutes from first to last.
Each service also has its own portal, and each portal shows its records differently. The sign-in appears in the Entra admin center, the message in Defender's mail search, and the upload in the Purview audit search. Analysts often have all three open at once, which is part of why the records are easy to misread together. The sections below show each one first as its portal lists it, then as the record behind the list.
The Sign-in
The account by name and by object ID, and the address it came fromLesson 0.1 read this sign-in in detail. Here it is again, with two values marked, because they reappear in the other records:
Activity Details: Sign-ins
×Her first sign-in, the same record as lesson 0.1, with the two values the other records share
The User ID, 6f1c2a90-3b7e-4d21-9a5c-0e8b4f7d2c13, is the account's object ID in Entra ID. It's assigned once and never changes. The IP address, 203.0.113.140, is the address the sign-in came from. The username, maya.ortiz@harborline.example, is the sign-in name, readable and present almost everywhere, but changeable if the account is renamed.
A sign-in is the start of most cloud activity. It produces a session, and everything the user does afterwards in that session, reading mail, opening files, is done under it. Sign-in records don't list what the session did. For that you need the records each service keeps, which the next two sections read.
That separation matters in an investigation. A suspicious sign-in tells you someone may have had access. Whether they used it, and for what, is in the mail and audit records, not the sign-in log. Module 6 follows sessions from one to the other.
Some services do record the session alongside activity, through a session or correlation identifier, and where they do it's the strongest join of all between a sign-in and what followed. Where they don't, as with the records here, the join falls back to the account, the address and the time, which is weaker and needs saying so.
Notice too what the sign-in doesn't say about the next hour. Maya's account stayed signed in, and the services she used afterwards relied on that session rather than signing her in again each time. So the absence of further sign-ins during the morning doesn't mean nothing happened. It means the activity is recorded elsewhere.
For this lesson, the sign-in contributes two things to the join: the object ID, which identifies the account beyond doubt, and the address, which identifies where the session started. Keep both in mind for the next two sections.
The Message
Two message IDs, two sender addresses, and a sending serverAt 09:02:31 UTC, a message arrived from a supplier. Here it is as a mail-search list in the security portal shows it:
Explorer
The message in a mail-search list, from its EmailEvents record
The list shows what most people need: when, what, from whom, to whom and where it ended up. The record behind it holds more, and the extra fields are where investigations happen:
The message's identifiers, and the field that ties it to her account
A message has two identifiers. Microsoft's documentation describes the NetworkMessageId as Microsoft 365's own unique ID for the message, and the InternetMessageId as a public-facing ID set by the sending system. The first is the one to use inside Microsoft's records. The second is the one to give the sender's administrator if you need to trace the message on their side, because it's the ID their system knows.
The sender also appears twice. SenderFromAddress is the address in the From header, the one the recipient sees. SenderMailFromAddress is the envelope sender, also called the Return-Path. Here they match. In phishing, they often don't, which is why Module 6 reads both.
SenderIPv4 is easy to misread. Microsoft describes it as the address of the last mail server that relayed the message, which here is 198.51.100.23. It's not the address of a person, and it's not Maya's. It belongs to whatever server handed the message to Microsoft.
Other fields in the mail record are worth knowing for Module 6. DeliveryAction says what the service did with the message: delivered, junked, blocked or replaced. DeliveryLocation says where it ended up, from the inbox to quarantine. Here the message was delivered to the inbox with no threat recorded, which is the normal case for a supplier's invoice.
And RecipientObjectId is Maya's Entra ID object ID, 6f1c2a90-3b7e-4d21-9a5c-0e8b4f7d2c13: the same value as the sign-in's User ID. That's the reliable join between her mail and her sign-ins.
The two message IDs also deserve a habit of their own. When you cite a message in a case, cite the NetworkMessageId, because that's what Microsoft's tools search on. When you ask another organization about it, give them the InternetMessageId. Writing both into the case note costs a line and saves a round trip later.
The File Upload
The audit record: an operation, an object and an addressAt 09:10:05 UTC, a file was uploaded to the finance site. Microsoft 365's audit log recorded it. Here's how an audit search lists it:
Audit
The upload in an audit search result, from its audit record
And the record itself, with the fields this lesson uses. The file's full path, in a field called OfficeObjectId, is in the list above:
{
"TimeGenerated": "2026-10-12T09:10:05.000Z",
"Operation": "FileUploaded",
"RecordType": "SharePointFileOperation",
"UserId": "maya.ortiz@harborline.example",
"UserKey": "i:0h.f|membership|10032003a1b2c3d4@live.com",
"ClientIP": "203.0.113.140",
"ResultStatus": "Succeeded"
}
Microsoft's schema for the audit log describes these fields. The Operation names the activity, here FileUploaded. UserId is the user's sign-in name. ClientIP is the address of the device used, which matches the sign-in's address. And for SharePoint and OneDrive, the object is the full path of the file or folder, here a file called Invoice-4471.pdf in the finance site's Invoices folder.
The UserKey is the odd one out. The schema calls it an alternative ID for the user, and for SharePoint, OneDrive and Exchange events it holds an internal identifier rather than the Entra ID object ID. It identifies Maya, but in a form no other record here uses. It's a field to know exists, and not one to join on.
The record's own identifier is useful too. Microsoft's schema gives every audit record a unique ID, which is how you'd cite this exact record in a case rather than describing it by its time and user.
Audit records are the closest thing the cloud has to an endpoint's process log. They record actions on objects: files uploaded, downloaded, shared and deleted, mailbox rules created, permissions changed. Module 6 relies on them heavily, and the first habit is the one shown here: read the operation, the object, the user and the address, and know which of them can be joined to other records.
Audit logging has the same caveat as Windows auditing in lesson 0.5. What's recorded depends on what's enabled and on the organization's license, and retention varies too. Before relying on the absence of an audit record, find out whether the activity would have been recorded.
The Values That Join Them
Three good joins, one weak one, and one that looks like a join and is notAcross three records, Maya and her device appear under several values. Some genuinely join the records, and one only looks as if it should:
The values that join the three records, and the one that looks like a join and is not
The sign-in name appears in all three, as UserPrincipalName, RecipientEmailAddress and UserId. It's the easiest join and the weakest, because names change. The object ID is stronger: it appears in the sign-in and the mail record and never changes. The audit record doesn't carry it here, so the audit joins on the name.
The address joins the sign-in and the upload: both record 203.0.113.140. That's useful supporting evidence that the upload came from the same place as the sign-in, but an address isn't an identity. An office address is shared by everyone in the office.
The mail record's SenderIPv4 looks like it might join too, since it's an address in a record about Maya. It doesn't. It's the sending server's address, on the other side of the message. Joining it to the sign-in's address would be comparing two unrelated things, and an analyst who did it would conclude, wrongly, that the addresses differ in a way that matters.
The rule is to join on values that mean the same thing in both records. A value with the same type, an address or an ID, isn't enough. It has to describe the same thing: the same account, the same device, the same message. Reading the field's documentation, as this lesson has done for each, is how you know.
A quick test helps when you're unsure. Ask what the value would be if nothing suspicious had happened. If Maya's sign-in address and the sending server's address would differ even on an ordinary day, as they would, comparing them tells you nothing. If her sign-in address and her upload address would normally match, as they would, a mismatch would be worth noticing.
There's one more join worth noting for later. The mail record's attachment and the uploaded file share a name pattern, but no field in these records ties them together. Section 7 comes back to that.
Putting Them in Order
The joining fields from each record, in UTCWith the joins understood, the records can be lined up. Here are the joining fields from each, with its time, the account, the account's identifier and an address:
$ jq '{TimeGenerated, UserPrincipalName, UserId, IPAddress}' gen/signin.json
{
"TimeGenerated": "2026-10-12T08:47:12.418Z",
"UserPrincipalName": "maya.ortiz@harborline.example",
"UserId": "6f1c2a90-3b7e-4d21-9a5c-0e8b4f7d2c13",
"IPAddress": "203.0.113.140"
}
$ jq '{Timestamp, RecipientEmailAddress, RecipientObjectId, SenderIPv4}' \
gen/mail.json
{
"Timestamp": "2026-10-12T09:02:31.000Z",
"RecipientEmailAddress": "maya.ortiz@harborline.example",
"RecipientObjectId": "6f1c2a90-3b7e-4d21-9a5c-0e8b4f7d2c13",
"SenderIPv4": "198.51.100.23"
}
$ jq '{TimeGenerated, UserId, UserKey, ClientIP}' gen/ual.json
{
"TimeGenerated": "2026-10-12T09:10:05.000Z",
"UserId": "maya.ortiz@harborline.example",
"UserKey": "i:0h.f|membership|10032003a1b2c3d4@live.com",
"ClientIP": "203.0.113.140"
}
The order is clear: sign-in at 08:47:12, message at 09:02:31, upload at 09:10:05, all UTC. The sign-in and the mail record share the object ID. The sign-in and the upload share the address. The upload's user key is an internal value. And the mail record's address is the sender's server, labeled as such to keep it apart.
Notice that ordering by time is safe here only because all three services record UTC. Mixing a record in local time into a timeline like this, as lesson 0.2 showed with the domain controller's events, would put it in the wrong place without any visible sign.
A timeline like this is the core output of a cloud investigation. Each line is one record, cited by its time and source, with the identifiers that tie it to the others. Module 6 builds longer ones across more services, but the shape is the same.
Short timelines like this one are also how you explain a case to someone outside security, such as a manager or a colleague in finance. A manager who asks what happened can read three lines in UTC far more easily than three records in three portals, as long as each line says where it came from.
It's also worth noticing what's not in the timeline. There's no record of Maya reading the message, opening its attachment or downloading anything. Those actions may have happened, and Microsoft 365 can record some of them in other audit records, but they aren't in the records here. The timeline has a gap between the message and the upload, and the gap is part of the finding.
Write the gap down explicitly when you build a timeline. "No record of the message being opened" is a fact about the records you have. It tells the reader what the timeline can and can't support, and it points to the record that would fill it if one is needed.
Laying the records out by hand like this is worth doing a few times, even though tools can do it for you. It's the quickest way to notice a value that doesn't match, a time that's out of order, or a field that means something different from what its name suggests.
Every line in the output is the command's own: jq read each file and printed the fields named. If you have jq, you can run the same three commands on the records shown in this lesson, saved as JSON.
When an Assistant Joins the Story
A plausible sequence, and the steps no record showsGiven these three records, an assistant will usually produce a smooth story. Here's one asked whether Maya saved the attachment.
Maya Ortiz received "Invoice 4471 for October" at 09:02 and a file called Invoice-4471.pdf was uploaded to the Finance site at 09:10. Did she save the email attachment to SharePoint?
Yes. She received the invoice email with one attachment at 09:02, opened it, and saved the attachment (Invoice-4471.pdf) to the Finance SharePoint site eight minutes later from the same office IP address she signed in from.
Check before you use it
The records show three things: a message with one attachment was delivered to her, and a file with a matching name was uploaded by her account from the address of her sign-in. They do not show that she opened the message, opened the attachment, or that the uploaded file is the attachment. Those are inferences, likely here, and a hash or a mail access record would be needed to confirm them.
An illustrative exchange, written for this lesson: an assistant you ask will word it differently.
The story is plausible and probably true. A supplier sends an invoice, the recipient saves it to the finance site eight minutes later. But three steps in it aren't in the records: opening the message, opening the attachment, and the uploaded file being the attachment. Each is an inference, and the assistant presented them as observations.
The difference matters most when the story is wrong. Suppose the attachment had been malicious and the uploaded file something else entirely. A finding that said "she saved the attachment to SharePoint" would send the team looking at the wrong file, and might miss that the attachment was never saved at all.
What would confirm the story? A hash of the attachment and a hash of the uploaded file, if the services recorded them. A mail access record showing the message was opened. A download or attachment-preview record, if one was logged. Module 6 teaches which of those Microsoft 365 records and under what settings.
Until then, the honest finding reads differently from the assistant's: a message with one attachment was delivered to Maya at 09:02, and her account uploaded a file with a matching name to the finance site at 09:10 from the address of her sign-in. That the file is the attachment is likely and unconfirmed.
When an assistant joins records into a story, ask it to mark which steps come from a record and which it inferred. Most will do it well when asked. Then write your finding the same way: the records show this, they suggest that, and this record would confirm it.
Assistants are also useful for the mechanical part of this work. Asked to lay three records out as a timeline in UTC, or to list the fields two records share, they're fast and usually accurate. The judgment about which shared fields actually mean the same thing is where they need checking, because a field name like ClientIP or SenderIPv4 sounds more alike than the two values are.
The same caution applies to assistants built into security products. Some will summarize a user's recent activity across services in a sentence or two, and the summary will join records the way this lesson describes, sometimes on the right values and sometimes on the convenient ones. Ask which records it used, and check the joins against the fields before relying on the summary.
Practice
Practice
Join three cloud records and say what the join shows the three recordsWork from the records in sections 2 to 4. Everything you need is on the page, including each record's identifiers.
Pay particular attention to the address fields in each record. Writing down what each address belongs to, a user's device, an office, a sending server, is the step most people skip and most mistakes come from.
- List the identifiers. From sections 2 to 4, write every value each record uses for the person, the message, the file and the device.
- Mark the joins. Pair the values that genuinely match across records, and mark any that only look as if they should.
- Order the times. Write the three events in order with their UTC times and the record each came from.
- Write the finding. One sentence for what the records show, one for what they suggest, and one for what would confirm it.
Lesson 0.7 turns from the records cloud services keep about people to records the network keeps about traffic: a packet capture, the flow record it would produce, and what each can show.