
Suspicious Login Investigation in Entra ID and Okta
A suspicious login investigation works out whether a sign-in flagged as risky was made by the account owner, and if it wasn't, what the person behind it did with the access.
Most flagged sign-ins turn out to have an ordinary cause, such as travel, a new phone or a VPN. Some are an attacker using the account. In one red team engagement Prophet Security analyzed, only one alert fired across the whole intrusion. It was an “uncommon location OAuth2 login to Office 365,” and most SOC teams have learned to treat that type of alert as background noise.
The alert itself rarely tells you which it is. Microsoft Entra ID’s unfamiliar sign-in properties detection, for example, flags a sign-in whose IP address, location, device or browser differs from the user’s history, and at any risk level the person behind it may still be the user on a new laptop or a hotel network.
This guide covers one job within alert triage: confirming or clearing a single flagged sign-in in Entra ID or Okta, and the first steps to contain one that wasn’t the user. Attacks with their own playbooks, such as credential stuffing and MFA fatigue, have separate guides.
How a suspicious login investigation reaches an answer
A suspicious login investigation usually rests on four checks: how the session authenticated, whether the source fits the user’s history, what the session did next, and what the user says when asked through a channel an attacker is unlikely to control.
Taking them in that order saves time. In most environments, the source check explains the majority of flagged sign-ins, and a session that did nothing unusual backs that up. When the source doesn’t fit, what happened during the session often settles it: a new MFA method, an inbox rule or an app consent the user can’t explain.
Asking the user comes last, so you know exactly what to ask about and can check the answer against the evidence. If the session’s activity already shows an attacker, contain first and ask later.
{{ebook-cta}}
Which signals flag a sign-in as risky in Entra ID and Okta?
In Entra ID, many suspicious login alerts start as ID Protection risk detections, such as unfamiliar sign-in properties, anonymous IP address and atypical travel. Some are worked out after the sign-in and can take up to 48 hours to appear, so the session behind the alert may have been running for a day or more. Without Entra ID P2, most detections show up only as “Additional risk detected,” with no detail on what triggered them.
In Okta, ThreatInsight rates the source IP address before the user is identified, Behavior Detection flags a sign-in from a new location, device, IP address or network, or travel that would be impossibly fast, and the risk engine rates each sign-in low, medium or high.
Many teams also run their own SIEM detections on the same logs, such as a first sign-in from a new country. The checks below apply whichever tool raised the alert. For Okta’s own alert types, see investigating Okta alerts.
Check how the session authenticated
Start a suspicious login investigation with the sign-in record, which shows whether MFA was required, which method was used and whether each step passed. In Okta, a successful session start only means the first factor passed, not that MFA was completed.
A failed or blocked sign-in still tells you something. If the password step passed before MFA failed or a policy blocked the sign-in, the password was correct, and unless the user made the attempt, someone else has it. Reset it.
Next, see how MFA was satisfied. Push approvals and one-time codes can be phished, while security keys and Windows Hello for Business resist phishing. Some phishing kits relay the user’s real MFA approval as it happens, so passing MFA doesn’t prove the session belongs to the user. Tracing the message that carried the link is a phishing investigation of its own.
Then check the device. A registered device proves little, since users can register personal devices and an attacker holding the account can register one too. A managed or compliant device is good evidence the sign-in came from a company device, with one catch: a replayed token can carry the compliance status of the device it was issued to. In the same red team engagement, the attacker’s stolen token carried the compliance claims of the user’s managed machine, so the usual quick check would have cleared the attacker.
Last, check how the user signed in. Older mail protocols such as IMAP can’t do MFA, so where a tenant still allows them, a successful sign-in through one never faced it. Device code sign-ins, meant for TVs and other devices without a keyboard, deserve a close look on an account with no reason to use them, since device code phishing hands an attacker tokens after the user completes MFA.
Compare the source with the user’s history
Compare where the sign-in came from with where this user normally signs in, starting with the type of network: a home ISP, a mobile carrier, a hosting provider or a proxy. Okta names the network’s owner, and Entra ID records a network number you can look up.
Most users don’t sign in from a data center, but corporate VPNs, web gateways and virtual desktops often do, so check the company’s own IP ranges before treating a hosting provider as a red flag.
Then look for anything new. A new device, browser and network together say more than any one alone, and the user’s successful sign-ins from the same place over the last 30 to 90 days show whether it’s new at all. Entra ID keeps sign-ins for 30 days, or seven on the free tier, so a longer look-back needs a SIEM. Treat location as an estimate, since geolocation sources often disagree about the same address.
Finally, check the IP address across the whole organization. Successful sign-ins from many colleagues suggest shared infrastructure such as an office or VPN, unless the address is new to the organization, in which case they can mean several compromised accounts. Failed attempts against many accounts suggest password spraying.
Look at what the session did next
Whether or not the source looks wrong, check what the session did after it started. Attackers usually try to keep access, collect data or reach other accounts. Users make many of these changes themselves, so check where each change came from. If the account is an admin, also check what it changed on other accounts, roles and policies, since resetting this account doesn’t undo those changes.

- A new MFA method or device. An attacker who registers their own authenticator can keep signing in after a password reset, for example by resetting the password again through self-service. Check both identity providers’ audit logs for methods and devices the user doesn’t recognize.
- Mailbox rules and forwarding. Rules that delete messages, move them to rarely opened folders or forward them outside the company can hide an attacker’s activity or copy mail out. The Microsoft 365 audit log records new and changed rules and forwarding.
- App consent. A consent to an app the user has never used is worth checking, especially if the app can read mail or files, since it can give an attacker access that outlasts a password reset.
- Unusual mail, file or app access. An attacker who only reads mail leaves no rule or consent behind. Microsoft 365 audit records show mailbox reads, unless the mailbox’s audit settings were customized. Bulk file downloads, new anonymous sharing links and first-time use of unfamiliar apps belong on the same list.
- Outbound mail. Check what the account sent with a message trace. Attackers have used compromised mailboxes to phish the user’s contacts and then deleted the replies.
- The same session from two networks. Both identity providers give each session an ID you can follow. One session seen from two unrelated networks minutes apart, such as a home ISP and a hosting provider, suggests a stolen token being reused, though a phone switching to cellular or a split-tunnel VPN can do the same. Session hijacking has its own investigation guide.
Ask the user, and check the answer
When the logs leave doubt, ask the user about the time, app, device and location. Microsoft’s guidance on investigating risk says to confirm the sign-in with the user, keeping in mind that their email or Teams might be compromised.
So use a channel the attacker is unlikely to control. A phone call to a number from HR records, not an MFA phone number the attacker could have added, is hard to intercept. Check where the reply came from, too: a “yes, that was me” sent from the same new IP address or device as the flagged sign-in may have come from the attacker.
In Okta, Suspicious Activity Reporting adds a report button to Okta’s security notification emails. A report is strong evidence that something is wrong, while no report means little, since many people ignore these emails.
Weigh the answer against everything else. A user who says “that was me in Lisbon” hasn’t cleared a session that also created a rule forwarding invoices outside the company, and users sometimes confirm activity they don’t clearly remember, such as an MFA prompt approved out of habit. Where ID Protection flagged the sign-in, record the outcome there as safe or compromised.
Benign patterns to rule out before escalating
Most flagged sign-ins have an ordinary explanation. These are the common ones and how they tend to look in the logs.
- Travel. A new country or city, often on a hotel, airport or in-flight network, with the user’s usual devices and browsers. A travel booking or approval supports it. Investigating impossible travel alerts covers distance and timing.
- A new phone. A first-seen device, often with a new Microsoft Authenticator or Okta Verify enrollment the same day, which looks just like an attacker adding an MFA method. Check whether the user replaced a device or the help desk reset their MFA, and confirm a reset with the user directly, since some attackers call help desks posing as the user.
- VPN, web gateway or virtual desktop traffic. A hosting provider’s network, or an unfamiliar city, that matches the company’s own IP ranges. Microsoft’s guidance is to add sanctioned VPN ranges to named locations, and sign-ins from trusted named locations carry lower risk. Okta network zones let policies recognize the same ranges. Consumer VPNs can trigger the anonymous IP address detection too, but attackers use them as well, so a consumer VPN clears a sign-in only alongside the other checks.
- Mobile carriers. Phones on cellular networks change IP address often, and carrier addresses can geolocate far from the user. Expect a carrier network, the user’s known phone and apps, and nothing unusual in what the session did.
- New accounts. Entra ID doesn’t flag unfamiliar sign-in properties during a new user’s learning period of at least five days, and Okta rates a new user’s sign-in attempts as high risk until it has a baseline, so lean harder on the other checks.
A benign-looking source doesn’t clear a sign-in on its own. Attackers can route through residential proxies or VPN exits near the user, so check what the session did even when the source looks ordinary.
If the sign-in wasn’t the user: scope and contain
When a suspicious login investigation ends with an attacker, cut off the access first, then work out how far it went. If the attacker may be able to reset the password or complete MFA, for example with a method they registered, block the account’s sign-in while you clean up.
If the evidence points to a token stolen from the user’s own device, check that device for token-stealing malware, including its EDR history from before the attack, since some of it deletes itself after it runs. Isolate the device before you revoke sessions and reset the password, or malware still on it can steal the new tokens, and keep the user off it until it’s cleaned or reimaged. If you can’t isolate it, such as a personal laptop, block the account’s sign-in until then, and have the user change the other passwords saved in that browser, and sign out of those sites, from a clean device.
In Entra ID, revoke the user’s sessions, which invalidates their refresh tokens and session cookies, and reset the password, since a reset alone can leave some sessions alive. In hybrid environments, Microsoft’s emergency revocation guidance also has you disable the on-premises account and reset its password twice.
If the token came from the user’s own device, also disable that device in Entra ID, which invalidates the main sign-in token issued on it, though that can take up to an hour. If the device syncs from on-premises Active Directory, disable it there as well, or the next sync turns it back on.
Revocation doesn’t end access instantly. Access tokens already issued keep working until they expire, 60 to 90 minutes by default, except in services that support Continuous Access Evaluation, such as Exchange Online and Teams, where access ends within minutes. Apps that keep their own sessions need their own sign-out.
In Okta, Clear User Sessions ends the user’s Okta sessions and revokes the tokens Okta issued to them but leaves the password unchanged, so reset it as well. Sessions inside other apps can stay active unless those apps are set up for Universal Logout and included when you clear the sessions.
Next, remove what the attacker added: MFA methods, devices, inbox rules, forwarding, app consents and sharing links. Microsoft’s app consent playbook walks through disabling a malicious app. Then keep watching the account, since a successful sign-in from the attacker’s IP address, network or browser after containment means access you missed.
Then find where the access began. Work back through the user’s sign-ins, including background ones such as token refreshes, to the first one from the attacker’s IP address, network or browser, and follow the session ID back to the sign-in that created it, since a stolen session can be reused from a different address. Search other accounts for the same IP address too, and for the same network or browser only when it’s unusual in your organization, since one attacker often targets several users.
Investigating suspicious logins with Prophet AI
Prophet AI SOC Analyst investigates every alert with senior-analyst depth, suspicious logins included. For each one it plans the investigation dynamically, queries the identity provider and the other connected sources, and documents every step and query. Your team can see how it reached its determination and rerun any query itself. Each investigation ends in an evidence-backed determination, including Inconclusive when the evidence doesn’t support a guess.
When the right next step is to ask the user, Agent Actions can ask the affected user questions over Slack or Microsoft Teams and feed the answer into the determination. Your team decides which actions run on their own, under what conditions, and which wait for a sign-off.
When an investigation confirms an account takeover, Prophet AI Threat Hunter scopes related activity across your connected data sources. It shows when the attack started as well as how far it reached. Its block-user response action also revokes the sessions and refresh tokens already issued to that user.
To see how Prophet AI investigates your identity alerts, request a demo.
A sign-in is flagged as risky when it departs from the user's history, comes from a source the identity provider distrusts or matches a known attack pattern. In Entra ID, ID Protection detections such as unfamiliar sign-in properties, anonymous IP address and atypical travel set the risk level. In Okta, ThreatInsight rates the source IP, Behavior Detection flags a new device, IP address, location or network, and the risk engine assigns a low, medium or high level.
Confirm it with the evidence first and the user second. Check how the session authenticated, whether the network, device and location fit the user's history, and whether the session did anything the user can't explain, such as adding an MFA method or an inbox rule. Then ask the user about the time, app, device and location through a channel an attacker is unlikely to control, and check the reply against the evidence.
Cut off the access first, then check what the attacker added and how far it reached. Look for MFA methods the user didn't register, inbox rules and forwarding, app consents, and unusual mail, file or app access. Then work back through the user's sign-ins, background ones included, to the first one from the attacker's infrastructure or session, and search for the same IP address, and any unusual network or browser, across other accounts.
Often, but not always. Corporate VPNs, web gateways, consumer VPNs and new phones are common causes of risky sign-in alerts. Attackers also use VPNs and residential proxies, and a new phone's MFA enrollment looks like an attacker adding a method. Match the source to the company's own IP ranges or the user's replaced device, and confirm that nothing the session did is out of character before closing it.
An impossible travel alert is one kind of suspicious login alert. It fires when two sign-ins happen too far apart to travel between in the time that passed. A sign-in can also be flagged for many other reasons, such as a new device, an anonymous IP address, a malicious IP address or an anomalous token. Investigating either one means deciding whether the account owner made the sign-in, and if not, what the session did.
A password reset may not end sessions that already exist. In Entra ID, Microsoft's revocation table shows a reset leaving some tokens and cookies alive, depending on how the user signed in and where the reset was made. Revoking sessions invalidates the user's refresh tokens and session cookies, though access tokens can keep working for 60 to 90 minutes by default, except in services that support Continuous Access Evaluation. In Okta, clearing the user's sessions also revokes their tokens.
Insights
Definitive Guide to Detection Engineering
Where detection engineering falls short, how to close those gaps, and what it looks like in an AI-enabled SOC.



.avif)
