I checked the logs while doing the aggregation and have found that the pagination never stops with the TERMINATE_IF statement. It never stops with the TERMINATE_IF statement. Here is what the logs show:
“==> Calculating data hash value for endpoint: Aggregate Accounts”
“==> Data hash is same. Paging will be terminated for endpoint: Aggregate Accounts”
It only runs the aggregate accounts endpoint twice and then terminates.
https://uat.onetrust.com/api/scim/v3/Users?filter=emails co "@company.com"&startIndex=1&count=1
//uat.onetrust.com/api/scim/v3/Users?filter=emails co "@company.com"&startIndex=1&count=1
As you can see the startIndex never changes eventhough it should on the second run.
I am not really sure why startIndex never changes or why it never ends on the TERMINATE_IF I removed it and it still terminated eventhough it shouldnt.
----------------EDIT 1----------------------
I increased the count to 3.
I found that it does page twice, but it still brings back 3 accounts.
There are 6 accounts on the source.
So I can assume the endpoint doesnt change on the second page through.
I checked the logs again.
just before the paging steps end it does create the new updated endpoint as seen here:
URL after replacing place holders :https://uat.app.com/api/scim/v3/Users?filter=emails co "@company.com"&startIndex=4&count=3
but then when it updates the endpoint with V1 endpoint related paging. It reverts back to the original endpoint with regards to the offset.