Agent Foskett Academy • KQL Academy • Module 13 • Lesson 152 • Cloud & SaaS Investigation

Lesson 152 — The Same Account Accessed SharePoint From Two Countries

Lesson 151 established that alex.wilson@contoso.com performed unusually large SharePoint and OneDrive downloads before resigning. Now another clue appears in the cloud timeline.

The same account accesses SharePoint from two different countries during the same investigation window. In this lesson we use KQL to correlate Microsoft 365 activity with Entra sign-in evidence and determine whether the geography represents normal travel, VPN or proxy behaviour, session reuse, or a genuine account-compromise concern.

Two countries sounds dramatic. But geography is only useful when IP, time, device, application and authentication context agree with the story.
Agent Foskett KQL Academy SharePoint two countries investigation
Your case file

SharePoint activity from the same account is observed from geographically separated IP addresses during the hours leading up to the resignation event.

✓ Reconstruct SharePoint access by IP
✓ Correlate Entra sign-ins
✓ Compare geography with historical behaviour
✓ Build one cloud activity timeline

Case briefing

CASE FILE User: alex.wilson@contoso.com 11:47 — SharePoint access from Australia ↓ 13:08 — additional SharePoint activity ↓ 13:21 — sign-in from another country appears ↓ 14:05 — bulk download activity continues ↓ 16:30 — resignation submitted THE QUESTION Did one legitimate user produce both access patterns, or does the evidence support session or account compromise?

Investigation objective

Use OfficeActivity and SigninLogs to compare SharePoint access with identity telemetry, preserve IP and location context, establish the user's normal geographic pattern and determine whether the two-country sequence is consistent with legitimate behaviour.

Investigator's rule

Location is supporting context, not identity proof. VPNs, proxies, mobile networks, cloud egress and inaccurate geolocation can all make a legitimate session appear somewhere unexpected.

Stage 1 — reconstruct SharePoint activity by source IP

Begin with the Microsoft 365 audit activity. Preserve the client IP, operation, site and user agent so the SharePoint events can later be compared with Entra sign-ins.

01-reconstruct-sharepoint-access-by-ip.kql
12345678910111213
let TargetUser = "alex.wilson@contoso.com";
OfficeActivity
| where TimeGenerated > ago(24h)
| where UserId =~ TargetUser
| where OfficeWorkload == "SharePoint"
| project TimeGenerated,
          UserId,
          Operation,
          Site_Url,
          SourceFileName,
          ClientIP,
          UserAgent
| order by TimeGenerated asc

Why preserve ClientIP?

The client IP is the first bridge between cloud application activity and identity telemetry. It can help determine whether the same source appears in sign-in evidence.

User agent adds context

A familiar browser or sync client can support one explanation; a completely different user agent may suggest a new access method. Either way, treat it as context rather than proof.

Stage 2 — examine the account's Entra sign-ins

Now query SigninLogs for the same user and time period. Keep IP, location, application, client type, device details, Conditional Access and authentication requirements visible.

02-examine-entra-signins.kql
123456789101112131415
let TargetUser = "alex.wilson@contoso.com";
SigninLogs
| where TimeGenerated > ago(24h)
| where UserPrincipalName =~ TargetUser
| project TimeGenerated,
          UserPrincipalName,
          IPAddress,
          Location,
          AppDisplayName,
          ClientAppUsed,
          DeviceDetail,
          ConditionalAccessStatus,
          AuthenticationRequirement,
          ResultType
| order by TimeGenerated asc

Successful sign-in is not enough

A successful authentication shows that access was granted. It does not prove that the legitimate user was behind the session.

Conditional Access is context too

A passed Conditional Access evaluation can tell you that policy requirements were satisfied. It does not automatically prove the session was trustworthy.

Stage 3 — correlate SharePoint IPs with sign-in evidence

Use the IP addresses seen in SharePoint activity as pivots into Entra sign-ins. This helps test whether the application activity and authentication activity belong to the same source patterns.

03-correlate-sharepoint-and-signin-ips.kql
1234567891011121314151617181920
let TargetUser = "alex.wilson@contoso.com";
let SharePointIPs =
    OfficeActivity
    | where TimeGenerated > ago(24h)
    | where UserId =~ TargetUser
    | where OfficeWorkload == "SharePoint"
    | summarize by ClientIP;
SigninLogs
| where TimeGenerated > ago(24h)
| where UserPrincipalName =~ TargetUser
| where IPAddress in (SharePointIPs)
| project TimeGenerated,
          IPAddress,
          Location,
          AppDisplayName,
          ClientAppUsed,
          ConditionalAccessStatus,
          AuthenticationRequirement,
          ResultType
| order by TimeGenerated asc

Matching IP strengthens correlation

If a SharePoint client IP also appears in the user's sign-in telemetry at the same time, the events become easier to connect. Keep timestamps narrow enough to avoid assuming unrelated events belong together.

No match is also useful

If a SharePoint source does not appear in the expected sign-in records, note the gap. It may reflect token reuse, service behaviour, telemetry limits or another access path that requires further investigation.

Stage 4 — establish the user's normal geography

Look back 30 days and summarise where the account normally signs in from. This gives the two-country observation a behavioural baseline.

04-establish-geographic-baseline.kql
1234567891011
let TargetUser = "alex.wilson@contoso.com";
SigninLogs
| where TimeGenerated > ago(30d)
| where UserPrincipalName =~ TargetUser
| summarize SignIns=count(),
            FirstSeen=min(TimeGenerated),
            LastSeen=max(TimeGenerated),
            IPs=make_set(IPAddress, 50),
            Apps=make_set(AppDisplayName, 50)
          by Location
| order by SignIns desc

New country is a clue

A country never seen in the user's recent history deserves attention, especially during another suspicious event. It is still supporting evidence rather than proof of compromise.

Frequent country does not prove legitimacy

An attacker can operate from locations already familiar to the account, and corporate VPN infrastructure can make many users appear in the same region. Baselines reduce uncertainty; they do not eliminate it.

Stage 5 — build the combined cloud timeline

Finally, normalise the sign-in and SharePoint evidence into one chronological view. This allows the investigation to compare authentication and application activity side by side.

05-build-two-country-cloud-timeline.kql
1234567891011121314151617181920212223242526
let TargetUser = "alex.wilson@contoso.com";
let StartTime = datetime(2026-08-18 10:00:00);
let EndTime = datetime(2026-08-18 16:30:00);
union
(
    SigninLogs
    | where TimeGenerated between (StartTime .. EndTime)
    | where UserPrincipalName =~ TargetUser
    | project TimeGenerated,
              EvidenceType="Sign-in",
              Source=IPAddress,
              Detail=strcat(AppDisplayName, " | ", tostring(Location),
                            " | CA=", tostring(ConditionalAccessStatus))
),
(
    OfficeActivity
    | where TimeGenerated between (StartTime .. EndTime)
    | where UserId =~ TargetUser
    | where OfficeWorkload == "SharePoint"
    | project TimeGenerated,
              EvidenceType="SharePoint",
              Source=ClientIP,
              Detail=strcat(Operation, " | ", Site_Url,
                            " | ", SourceFileName)
)
| order by TimeGenerated asc

What are we testing?

We are testing whether the cloud activity forms one plausible user journey or whether the timing, geography and access pattern suggest that another session or actor may have been involved.

Do not calculate impossible travel blindly

Country changes alone are not enough. Before making an impossible-travel claim, validate geolocation quality, time difference, VPN use, device context and whether the sessions actually represent separate physical locations.

Agent Foskett's two-country timeline

11:47 SharePoint activity Australia ↓ 13:08 Download activity continues ↓ 13:21 Entra sign-in Different country ↓ IP + LOCATION + CLIENT reviewed against SharePoint activity ↓ 30-DAY BASELINE Second country not normally seen ↓ SESSION CONTEXT Conditional Access + app + device reviewed ↓ ASSESSMENT Geographic inconsistency requires escalation — compromise still requires corroboration
The map made it suspicious. The session evidence decided whether the map mattered.

Your evidence board

EvidenceWhat it supportsWeight
SharePoint activity from two countriesEstablishes geographic inconsistency in the cloud activity.Strong context
Second country absent from recent baselineSupports abnormal behaviour for the account.Strong supporting evidence
Matching SharePoint and sign-in IPsConnects application activity to authentication context.Strong
Different device or client applicationMay suggest a separate session or access method.Strong when validated
Conditional Access passedShows policy requirements were satisfied.Does not prove legitimacy
Country difference aloneDoes not prove impossible travel or account compromise.Insufficient alone

Write the finding like an investigator

Example: Microsoft 365 audit and Microsoft Entra sign-in telemetry recorded SharePoint activity for alex.wilson@contoso.com from IP addresses geolocated to two different countries during the same investigation window. The SharePoint client IPs were correlated with sign-in records and reviewed alongside application, client, device, Conditional Access and authentication context. The second country was not observed in the account's recent 30-day sign-in baseline. This geographic inconsistency, occurring during the same period as unusually large pre-departure downloads, supports escalation for possible session or account compromise. The evidence does not, by itself, establish impossible travel or malicious access; VPN, proxy, device and geolocation factors should be validated before reaching a stronger conclusion.

Lesson 152 key takeaways

  • Correlate Microsoft 365 application activity with Entra sign-in telemetry.
  • Preserve IP, location, application, client, device and authentication context.
  • A successful sign-in does not prove the legitimate user performed it.
  • A passed Conditional Access result does not automatically prove a session is trustworthy.
  • Use SharePoint client IPs as pivots into identity telemetry.
  • Historical geographic baselines help identify genuinely unusual access patterns.
  • VPNs, proxies and geolocation errors can create misleading country changes.
  • Do not label an event impossible travel based on country names alone.
  • Build one chronological view of sign-in and application evidence.
  • Write the conclusion at exactly the strength supported by the combined evidence.

Module 13 — the cloud investigation continues

Lesson 151 identified unusually large data collection before resignation. Lesson 152 now adds geographic inconsistency to the account's SharePoint activity. Next we examine a much sharper behavioural spike: hundreds of files downloaded in only eleven minutes.

Next: Lesson 153 — Hundreds of Files Were Downloaded in Eleven Minutes.

Continue your KQL investigation training

Module 13 follows users, sessions, applications and data through Microsoft 365 and cloud services.

Related Agent Foskett Investigations

Continue investigating suspicious cloud activity where identity and Microsoft 365 telemetry must be correlated before reaching a conclusion.

🔎 KQL Academy — Module 13: Advanced Cloud & SaaS Investigation

Following users, sessions, applications and data through Microsoft 365 and cloud services.

Investigate SharePoint access from two countries with KQL

Lesson 152 of the Agent Foskett KQL Academy uses Microsoft Sentinel, OfficeActivity and SigninLogs to investigate geographically separated Microsoft 365 activity.

Correlate SharePoint and Entra sign-in evidence

Learn how to compare client IPs, locations, applications, devices, Conditional Access results and historical sign-in patterns to determine whether a two-country access sequence supports possible account or session compromise.