Description
Hi I'm unable to get delta member list for groups using the initial delta query. This is the code for executing the query
public DirectoryObjectCollectionPage getGroupDeltaMembers() {
LinkedList<Option> requestOptions = new LinkedList<Option>();
requestOptions.add(new HeaderOption("ConsistencyLevel", "eventual"));
GroupDeltaCollectionRequestBuilder groupReq = client.getGraphServiceClient().groups().delta();
GroupDeltaCollectionPage groupPage = null;
int count = 0;
int grpCount = 0;
List<Group> groups = null;
String displayName = null;
String id = null;
String description = null;
// do {
// if (count == 0) {
groupPage = groupReq.buildRequest(requestOptions)
// .delta()
.filter(" id eq 'bc5bef51-2571-46e2-8d47-3d787e7ea083'")
// .filter("id eq '" + graphIdString + "'")
.select("id,description,displayName,onPremisesSamAccountName,createdDateTime,members")
//.expand("members")
.get();
groups = groupPage.getCurrentPage();
// AdditionalDataManager additionalDataManager = groupPage.additionalDataManager();
Group firstGroup = groups.get(0);
id = firstGroup.id;
displayName = firstGroup.displayName;
description = firstGroup.description;
String onPremisesSamAccountName = firstGroup.onPremisesSamAccountName;
OffsetDateTime createdDateTime = firstGroup.createdDateTime;
DirectoryObjectCollectionPage members = firstGroup.members;
count++;
log.info("Page# " + count);
log.info("GRAPH Group ID: " + id);
log.info("GRAPH Group Name: " + displayName);
log.info("GRAPH Group Description: " + description);
log.info("GRAPH Group onPremisesSamAccountName: " + onPremisesSamAccountName);
log.info("GRAPH Group createdDateTime: " + createdDateTime);
log.info("GRAPH Group Members: " + members);
count++;
log.info("Page# " + count);
return members;
}
Expected behavior
"members@delta": [
{
"@odata.type": "#microsoft.graph.user",
"id": "24d9a7d8-8cb5-4fbb-a2dd-bb7226b22b5f"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "eedadebe-fb8c-456a-b480-1b23a69e0192"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "9f11ed87-e3a5-4a95-a5a3-0b6423da39ed"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "d9fd16bf-41fc-4a2d-8c16-d94dc7fd671d"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "530fc5da-faaf-4059-9cb1-51cd9cdb3645"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "76f569e5-af21-4fe5-982d-493290bce248"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "465b42d6-c97f-41d9-a8e4-f09aaa0631ae"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "ae99443d-a80b-4e49-af47-9f2f48306b51"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "49548968-d62c-43b9-a494-8fbd10198524"
}
]
Actual behavior
Steps to reproduce the behavior
Following files attached
GraphResource.java
GraphClient.java
end point /graph/getGroupDeltaMembers
Console Log:
2022-09-06 09:50:03,484 INFO [com.gm.GraphResource] (executor-thread-0) Page# 1
2022-09-06 09:50:03,486 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group ID: bc5bef51-2571-46e2-8d47-3d787e7ea083
2022-09-06 09:50:03,488 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group Name: jvawt_honda_sav_body
2022-09-06 09:50:03,492 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group Description: Stephen Gross Body Work Team
2022-09-06 09:50:03,492 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group onPremisesSamAccountName: JVAWT_Honda_SAV_Body
2022-09-06 09:50:03,493 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group createdDateTime: 2020-11-10T20:16:27Z
2022-09-06 09:50:03,493 INFO [com.gm.GraphResource] (executor-thread-0) GRAPH Group Members: null
2022-09-06 09:50:03,494 INFO [com.gm.GraphResource] (executor-thread-0) Page# 2