Find Old Inactive Computer\Devices and User Accounts in Azure Active Directory

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&$filter=userType eq ‘Member’&$filter=accountEnabled eq true

Inactive Guest Users

https://graph.microsoft.com/v1.0/users?$filter=signInActivity/lastSignInDateTime le 2023-05-13T00:00:00Z&$filter=userType eq ‘Guest’&$filter=accountEnabled eq true

How to report on Inactive Users that are not Syncing from Onprem ( Cloud Only )

The Value onPremisesSyncEnabled 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 )

https://graph.microsoft.com/beta/groups/%AZUREGROUPID%/members?$count=true&$filter=accountEnabled eq true&$filter=signInActivity/lastSignInDateTime le 2023-05-13T00:00:00Z&$filter=userType eq ‘Member’&$select=userPrincipalName

Inactive Devices

Graph Explorer ( change Date ) : https://graph.microsoft.com/v1.0/devices?$filter=approximateLastSignInDateTime le 2023-05-13T00:00:00Z

How to get Json Odata exported from Graph Explorer to Excel

https://www.howtogeek.com/775651/how-to-convert-a-json-file-to-microsoft-excel/

Inactive Guest Accounts

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...