in src/main/java/com/microsoft/aad/oidcpoc/JSONHelper.java [105:120]
public static String fetchDeltaLink(JSONObject jsonObject) throws Exception {
String deltaLink = "";
// Parse the skip token out of the string.
deltaLink = jsonObject.optJSONObject("responseMsg").optString("aad.deltaLink");
if (deltaLink == null || deltaLink.length() == 0) {
deltaLink = jsonObject.optJSONObject("responseMsg").optString("aad.nextLink");
logger.info("deltaLink empty, nextLink ->" + deltaLink);
}
if (!deltaLink.equalsIgnoreCase("")) {
// Remove the unnecessary prefix from the skip token.
int index = deltaLink.indexOf("deltaLink=") + (new String("deltaLink=")).length();
deltaLink = deltaLink.substring(index);
}
return deltaLink;
}