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

Get Users using Delta query does not return the nextLink or deltaLink with C# code

Copper Contributor

I have registered an application and provided the required permission in Azure and using that application to retrieve the modified users via delta Query.

Below is the code.

 

 

 GraphServiceClient graphClient = new GraphServiceClient(Constant.ResourceUrl,
           new DelegateAuthenticationProvider(async (requestMessage) =>
           {
               var token = await AcquireTokeneAsyncForApplication();
               requestMessage.Headers.Authorization = new
                  AuthenticationHeaderValue("bearer", token);
           }));

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

 

But the response does not contain the nextLink or deltaLink as mentioned in the documentation.

 

dhruvilp_1-1628161760416.png

I can get the above links if I test the API in the graph explorer.

https://graph.microsoft.com/v1.0/users/delta

Response from Graph Explorer.

 

dhruvilp_3-1628161821714.png

 

Am I missing anything here while calling the same API using C#?

Any help on this will be appreciated!

 

0 Replies