Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community
SOLVED

Get recently added / updated users from Azure Active Directory

Copper Contributor

I want to fetch all the users from Azure Active Directory who are recently modified/added using Graph API.

 

I tried to search for the lastModified, or Modified property which returns the last modified date on which the filter can be applied but did not find any.  (Ref: User Properties)

 

Is there any way to achieve the above requirement?

 

My goal is to get the users modified in a specific time frame and perform the business logic.

3 Replies
best response confirmed by dhruvilp (Copper Contributor)

@Vasil Michev 

 I tried using delta queries but it returns all the users.

Also, I am not getting the nextLink or the deltaLink in the initial response.

Below is my code.

var pagedCollection = await graphClient.Users
.Delta()
.Request()
.Select("userPrincipalName,jobTitle,mobilePhone")
.GetAsync();

 Below is the response.

dhruvilp_0-1628074002279.png

 

Am I missing something here?

 

@dhruvilp 

Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Azure Active Directory space- please post Azure Active Directory questions here in the future. 

1 best response

Accepted Solutions
best response confirmed by dhruvilp (Copper Contributor)