{"id":7036,"date":"2023-06-12T14:35:26","date_gmt":"2023-06-12T14:35:26","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7036"},"modified":"2024-08-31T05:33:44","modified_gmt":"2024-08-31T05:33:44","slug":"find-old-inactive-computerdevices-and-user-accounts-in-azure-active-directory","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/find-old-inactive-computerdevices-and-user-accounts-in-azure-active-directory","title":{"rendered":"Find Old Inactive Computer\\Devices and User Accounts in Azure Active Directory"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Azure AD Accounts<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Inactive Guest or Member Users<\/h3>\n\n\n\n<p>Graph Explorer ( change Date )  : https:\/\/graph.microsoft.com\/v1.0\/users?$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inactive Member Users<\/h3>\n\n\n\n<p>https:\/\/graph.microsoft.com\/v1.0\/users?$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z&amp;$filter=userType eq &#8216;Member&#8217;&amp;$filter=accountEnabled eq true<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inactive Guest Users<\/h3>\n\n\n\n<p>https:\/\/graph.microsoft.com\/v1.0\/users?$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z&amp;$filter=userType eq &#8216;Guest&#8217;&amp;$filter=accountEnabled eq true<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to report on Inactive Users that are not Syncing from Onprem ( Cloud Only ) <\/h3>\n\n\n\n<p>The Value <strong>onPremisesSyncEnabled<\/strong> in Graph API we cannot report on in the \/users Graph API , the workaround is to create a Dynamic group with Only Cloud Only users and use Groups API ( Member of ) <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"422\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23-1024x422.png\" alt=\"\" class=\"wp-image-7043 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23-1024x422.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23-300x124.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23-768x317.png 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-23.png 1227w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"176\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24-1024x176.png\" alt=\"\" class=\"wp-image-7045 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24-1024x176.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24-300x52.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24-768x132.png 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-24.png 1353w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>https:\/\/graph.microsoft.com\/beta\/groups\/%AZUREGROUPID%\/members?$count=true&amp;$filter=accountEnabled eq true&amp;$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z&amp;$filter=userType eq &#8216;Member&#8217;&amp;$select=userPrincipalName<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inactive Devices<\/h3>\n\n\n\n<p>Graph Explorer  ( change Date ) : https:\/\/graph.microsoft.com\/v1.0\/devices?$filter=approximateLastSignInDateTime le 2023-05-13T00:00:00Z<\/p>\n\n\n\n<p><strong>Emai Report Inactive Devices<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.burgerhout.org\/device-clean-up-in-azuread-intune\">https:\/\/www.burgerhout.org\/device-clean-up-in-azuread-intune<\/a><\/p>\n\n\n\n<p><strong>How to get Json Odata exported from Graph Explorer to Excel<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.howtogeek.com\/775651\/how-to-convert-a-json-file-to-microsoft-excel\/\">https:\/\/www.howtogeek.com\/775651\/how-to-convert-a-json-file-to-microsoft-excel\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inactive Guest Accounts<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"649\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17-1024x649.png\" alt=\"\" class=\"wp-image-7015 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17-1024x649.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17-300x190.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17-768x487.png 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/06\/image-17.png 1305w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Azure AD Accounts Inactive Guest or Member Users Graph Explorer ( change Date ) : https:\/\/graph.microsoft.com\/v1.0\/users?$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z Inactive Member Users https:\/\/graph.microsoft.com\/v1.0\/users?$filter=signInActivity\/lastSignInDateTime le 2023-05-13T00:00:00Z&amp;$filter=userType eq &#8216;Member&#8217;&amp;$filter=accountEnabled eq [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7036","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7036"}],"version-history":[{"count":4,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7036\/revisions"}],"predecessor-version":[{"id":8260,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7036\/revisions\/8260"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}