HI, try this:
https://office365itpros.com/2019/10/15/report-old-guest-accounts/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Team,
Am looking to Pull the Guest account details with users last Sign-In details so that we can find out which Guest user account is currently in-use actively and which are not.
Thank you for your post and I apologize for the delayed response!
To pull the Guest account details with users last Sign-In details, you should be able to leverage the Microsoft Graph API. To hopefully help point you in the right direction, I'll share the steps below.
How To: Manage inactive user accounts
Inactive accounts are user accounts that aren't required anymore by members of your organization to gain access to your resources. One key identifier for inactive accounts is that they haven't been used for a while to sign in to your environment. Because inactive accounts are tied to the sign-in activity, you can use the timestamp of the last time an account attempted to sign in to detect inactive accounts.
Prerequisites: To access the lastSignInDateTime
property using Microsoft Graph:
You need a Microsoft Entra ID P1 or P2 edition license.
You can detect inactive accounts by evaluating the lastSignInDateTime
property exposed by the signInActivity
resource type of the Microsoft Graph API. The lastSignInDateTime
property shows the last time a user attempted to make an interactive sign-in attempt in Microsoft Entra ID. Using this property, you can implement a solution for the following scenarios:
lastSignInDateTime
for each respective user:
https://graph.microsoft.com/v1.0/users?$select=displayName,signInActivity
Additional Links:
How to investigate a single user - Azure Portal
You can also view a user's latest sign-in details (interactive / non-interactive) within Microsoft Entra ID to determine if the user(s) has been active or not.
Additional Link:
I hope this helps!
If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.
If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.