{"id":4396,"date":"2022-10-21T10:37:46","date_gmt":"2022-10-21T17:37:46","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4396"},"modified":"2022-10-21T10:37:48","modified_gmt":"2022-10-21T17:37:48","slug":"how-to-force-log-off-one-or-all-users-from-microsoft-365","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4396","title":{"rendered":"How to Force Log Off One or All Users from Microsoft 365"},"content":{"rendered":"\n<p>In situations involving compromised user accounts simply disabling an account is often not sufficient to mitigate the threat especially if the account is actively being using to send SPAM\/Phishing email or to download data. There are three supported ways of revoking an active user\u2019s session in Office 365.<\/p>\n\n\n\n<p>The first option is found in the Office 365 Admin Center under\u00a0<a href=\"https:\/\/portal.office.com\/adminportal\/home#\/users\">Home > Active Users<\/a>. Select a user and expand the OneDrive Settings section for that user. Select \u201cInitiate\u201d to perform a one-time sign-out for that user that revokes active sessions across Office 365 services including Exchange Online.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"574\" height=\"597\" src=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/10\/sign-out.png\" alt=\"\" class=\"wp-image-4397\" srcset=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/10\/sign-out.png 574w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/10\/sign-out-288x300.png 288w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/figure>\n\n\n\n<p>The second option to force logoff during an active user session in Office 365 to use Revoke-SPOUserSession cmdlet from the&nbsp;<a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=35588\">SharePoint Online PowerShell Module<\/a>. This method is helpful for automating security incident response flows or when there is a need to revoke multiple users\u2019 sessions.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/msdntnarchive.blob.core.windows.net\/media\/2017\/06\/image392.png\"><img decoding=\"async\" src=\"https:\/\/msdntnarchive.blob.core.windows.net\/media\/2017\/06\/image_thumb371.png\" alt=\"image\" title=\"image\"\/><\/a><\/figure>\n\n\n\n<p>The third option to force a user sign-out extends beyond Office 365 services to all active user sessions in any Azure AD application (thanks to Micah Linehan for recommending to include this option in the list). The&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/azuread\/revoke-azureaduserallrefreshtoken?view=azureadps-2.0\">Revoke-AzureADUserAllRefreshToken<\/a>&nbsp;cmdlet is available in the&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/azure\/install-adv2?view=azureadps-2.0\">AzureAD V2 PowerShell Module<\/a>&nbsp;and expires a user&#8217;s refresh token by modifying the user&#8217;s token validity period.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/msdntnarchive.blob.core.windows.net\/media\/2017\/06\/image424.png\"><img decoding=\"async\" src=\"https:\/\/msdntnarchive.blob.core.windows.net\/media\/2017\/06\/image_thumb402.png\" alt=\"image\" title=\"image\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">To force log off all users<\/h2>\n\n\n\n<p>Get-AzureADUser -all $true | revoke-azureaduserallrefreshtoken<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Ref: https:\/\/learn.microsoft.com\/en-gb\/archive\/blogs\/educloud\/how-to-kill-an-active-user-session-in-office-365<\/p>\n\n\n\n<p><br><a href=\"https:\/\/filestore.community.support.microsoft.com\/api\/images\/e2fe2867-bd14-4df9-ba43-787147d5123e?upload=true\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p>For other options, you can refer to the following article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In situations involving compromised user accounts simply disabling an account is often not sufficient to mitigate the threat especially if the account is actively being using to send SPAM\/Phishing email or to download data. There are three supported ways of revoking an active user\u2019s session in Office 365. The first option is found in the <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4396\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1249,10,18,1224],"tags":[1349,1351,1350],"class_list":["post-4396","post","type-post","status-publish","format-standard","hentry","category-azure-microsoft","category-microsoft","category-microsoft-office","category-powershell","tag-log-off-all-users-from-microsoft-365","tag-log-off-all-users-from-office-365","tag-log-off-user-from-microsoft-365"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4396"}],"version-history":[{"count":1,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4396\/revisions"}],"predecessor-version":[{"id":4398,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4396\/revisions\/4398"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}