Entra ID guest users

Rajiv Kesavan 25 Reputation points
2025-01-27T17:33:17.57+00:00

Need PS commands to get entra ID guest users Pending invitations and last login and other details.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,240 questions
0 comments No comments
{count} votes

Accepted answer
  1. Goutam Pratti 1,670 Reputation points Microsoft Vendor
    2025-01-27T21:40:23.68+00:00

    Hello @Rajiv Kesavan ,

    Thank you for Reaching out Microsoft Q&A.

    I understand you want to get the Entra ID guest users Pending invitations and last login details using Powershell commands.

    You can use the below PS commands to get the guest users Pending invitations:
    User's image

    For the last login details you can follow below and get the details:

    Get-MgUser -All -Filter "UserType eq 'Guest'" -Property SignInActivity | Select-Object userprincipalname -ExpandProperty SignInActivity | Format-List
    

    User's image

    for additional details on last login you can follow: https://m365scripts.com/microsoft365/a-quick-approach-to-manage-guest-users-in-microsoft-365-using-powershell/#Check-Office-365-Guest-Users-Last-Logon-Time
    https://www.michev.info/blog/post/2968/reporting-on-users-last-logged-in-date-in-office-365

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    Regards,
    Goutam Pratti.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Rajiv Kesavan 25 Reputation points
    2025-02-11T18:06:56.79+00:00

    Problem solved. Thanks for your help.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.