1
votes

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

Checked about Differential Query, but not sure which property to use with this and how to use a differential query with C# SDK.

Is there any other property available, which can be used to query the data?

Thanks in advance.

1

1 Answers

0
votes

To track recent changes in users you can use delta to get the required details.

To begin tracking changes , initiate a http request:

GET /users/delta

Then you can add query parameters using C#:

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var delta = await graphClient.Users
    .Delta()
    .Request()
    .GetAsync();

Note : The above code gets all the details of the user .

To get only the changed details for the user use the code below:

    GraphServiceClient graphClient = new GraphServiceClient( authProvider ); 
    var delta = await graphClient.Users 
    .Delta() 
    .Request() 
    .Header("Prefer","return=minimal") 
    .GetAsync();

Reference : Get Delta