Identifying and disabling the inactive Azure AD guest account?

EnterpriseArchitect 5,606 Reputation points
2023-06-23T05:59:54.2066667+00:00

How can I use the built-in Azur AD Premium P2 feature to automatically identify and disable the inactive Guest User account?

So far I can only find: https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/review-and-remove-aad-inactive-users-in-public-preview/ba-p/3290632 the preview feature, but it only works for the Guest that are members of Teams, SharePoint site and M365 groups. The stand-alone guest that was manually created or invited is not shown.

Any help and suggestion would be greatly appreciated.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,999 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,972 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Harpreet Singh Matharoo 8,306 Reputation points Microsoft Employee
    2023-06-26T09:23:08.3366667+00:00

    Hello @EnterpriseArchitect

    Thank you for reaching out. I understand the ask here it to identify and disable guest users. You can review following script that I created on StackOverflow which detects Guest users who have not accepted the invite and disables them:

    How to Automatically Remove Pending Guest Users in Azure Active Directory after 30 Days: https://stackoverflow.com/collectives/azure/articles/75918495/how-to-automatically-remove-pending-guest-users-in-azure-active-directory-after

    Please let me know if this helps. If this helps to resolve your query. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.