With reference to batch sample code
I wrote a batch code that registers the name in the contact form.
The status after execution is 200, but it is not added to correspondence.
Please let me know if anyone knows what is wrong.
Thank you.
GraphServiceClient oGraphClient = oClientCredPrv.getGraphClient();
BatchRequestContent oBatchRequestContent = new BatchRequestContent();
List<QueryOption> oContactList = Arrays.asList(new QueryOption("givenName", "John "),
new QueryOption("surname", "Smith"));
IHttpRequest oHttpRequest = oGraphClient.users(p_Upn).contacts().buildRequest(oContactList);
String oRequestStepId = oBatchRequestContent.addBatchRequestStep(oHttpRequest);
BatchResponseContent batchResponseContent = Objects
.requireNonNull(oGraphClient.batch().buildRequest().post(oBatchRequestContent));
BatchResponseStep<JsonElement> oContactsResponse = Objects
.requireNonNull(batchResponseContent.getResponseById(oRequestStepId));
System.out.println("result:" + oContactsResponse.status);