Azure AD B2C - List user accounts deleted and updated

Tarkowski, Michael (M.) 156 Reputation points
2023-10-07T12:12:35.9566667+00:00

We are using Azure AD B2C for all of our customer accounts. We want to identify the following for the last 5 days.

  • Which user accounts were deleted.
  • Which user accounts were updated. Questions
  1. Is there a graph API that will return the above information?
  2. Is there an Azure service that will return the above information?
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,646 questions
Microsoft Entra
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 37,216 Reputation points
    2023-10-10T08:24:36.5233333+00:00

    Hi @Tarkowski, Michael (M.)

    I spent some time researching this issue. Currently, deleted and updated users in the last 5 days can only be obtained by calling the Azure AD B2C Audit Log API.

    Example API endpoint:

    GET https://graph.microsoft.com/v1.0/auditLogs/directoryAudits?$filter=loggedByService eq 'Core Directory' and category eq 'UserManagement' and activityDateTime ge 2023-10-05T00:00:00Z and activityDisplayName eq 'Update user' or activityDisplayName eq 'Delete user'
    

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful