Skip to content

Commit 99314c9

Browse files
authored
Merge pull request #3331 from MicrosoftDocs/chrisda
Update responding-to-a-compromised-email-account.md
2 parents d2edd6e + fc50e6a commit 99314c9

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

defender-office-365/responding-to-a-compromised-email-account.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ search.appverid:
2424
- MET150
2525
description: Learn how to recognize and respond to a compromised email account using tools available in Microsoft 365.
2626
ms.service: defender-office-365
27-
ms.date: 03/19/2025
27+
ms.date: 03/31/2025
2828
appliesto:
2929
- ✅ <a href="https://learn.microsoft.com/defender-office-365/eop-about" target="_blank">Exchange Online Protection</a>
3030
- ✅ <a href="https://learn.microsoft.com/defender-office-365/mdo-about#defender-for-office-365-plan-1-vs-plan-2-cheat-sheet" target="_blank">Microsoft Defender for Office 365 Plan 1 and Plan 2</a>
@@ -146,22 +146,16 @@ This step immediately invalidates any active access using the stolen credentials
146146
Connect-MgGraph -Scopes User.RevokeSessions.All
147147
```
148148

149-
4. To store the details of the user account in the variable named `$user`, replace \<UPN\> with the user's account (user principal name or UPN), and then run the following command:
149+
4. Replace \<UPN\> with the user's account (user principal name or UPN), and then run the following command:
150150

151-
```powershell
152-
$user = Get-MgUser -Search UserPrincipalName:'<UPN>' -ConsistencyLevel Eventual
153-
```
154-
155-
For example:
156-
157-
```powershell
158-
$user = Get-MgUser -Search UserPrincipalName:'[email protected]' -ConsistencyLevel Eventual
159-
```
151+
```powershell
152+
Revoke-MgUserSignInSession -UserId <UPN>
153+
```
160154

161-
5. Revoke the user's sign-in sessions by running the following command:
155+
For example:
162156

163157
```powershell
164-
Revoke-MgUserSignInSession -UserId $user.Id
158+
Revoke-MgUserSignInSession -UserId [email protected]
165159
```
166160

167161
For more information, see [Revoke user access in an emergency in Microsoft Entra ID](/entra/identity/users/users-revoke-access).

0 commit comments

Comments
 (0)