Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Issue with Saviynt Connector: Pagination Limitation on User Import via REST API

Roua
Regular Contributor III
Regular Contributor III

Hi everyone,

I’m facing an issue with the Saviynt connector related to pagination when importing users via the REST API. Here’s the situation:

I can successfully test the connection when I specify a single user, make a change, and run the update job. like the following:

 

 

"url": "https://XXXXXX.saviyntcloud.com/ECM/api/v5/user?q=username:AT0345678&fields=username,email,displayname",

 

 

However, when I try to include all users using the following configuration, it only updates 50 users, even though I have set the batch size and the total count path correctly.

Here’s the JSON configuration I used:

 

 

{
    "url": "https://XXXXXX.saviyntcloud.com/ECM/api/v5/user?q=username:AT0345678&fields=username,email,displayname&order=desc&max=10000",

and 


    "pagination": {
        "offset": {
            "offsetParam": "offset",
            "batchParam": "max",
            "batchSize": 50,
            "totalCountPath": "completeResponseMap.total"
        }
    }
}

 

 

However, this only processes 50 users.

I tried several methods, including the examples from the Saviynt documentation:

Saviynt Developers Handbook
Postman Documentation

Most recently, I tried this configuration:

 

 

{
    "url": "https://XXX.saviyntcloud.com/ECM/api/v5/user?q=accountExpired:0&fields=username,email,displayname&order=desc&max=10000",

and

    "pagination": {
        "offset": {
            "offsetParam": "offset",
            "batchParam": "max",
            "batchSize": 500,
            "totalCountPath": "1500",
            "paramPosition": "url,httpHeaders,httpParams"
        }
    }
}

 

 

This time, it gave me 500 users but did not continue to fetch the next batch of 500, regardless of how I adjusted the offset or max parameters. Sometimes, it only returns 50 users.

Has anyone encountered a similar issue? Any suggestions on how to fix this or make the pagination work as expected? an use case that is working regarding this ?
i attached the logs file

Thanks in advance for your help!

Roua_0-1724852834864.png

 



4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Refer https://forums.saviynt.com/t5/identity-governance/rest-user-import-paging/m-p/109927#M73165

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.count<50?null:'https://[tenant].saviyntcloud.com/ECM/api/v5/user?sort=userkey&q=[query]&fields=[list of fields]&max=50&offset='+Math.addExact(Integer.parseInt(response.completeResponseMap.offset),50)}"
}
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

indra_hema_95
Regular Contributor III
Regular Contributor III

Hi @Roua Can you please try this ?

"offset": {
"offsetParam": "offset",
"startOffsetIndex": 0,
"batchParam": "limit",
"batchSize": 500,
"paramOrder": "offsetParam,batchParam",
"paramPosition": "url",
"totalCountPath": 1500
}

Regards,

Indra

stalluri
Valued Contributor II
Valued Contributor II

@Roua 

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.count<50?null:'https://XXXXXXX.saviyntcloud.com/ECM/api/v5/user?sort=userkey&fields=username,email,displayname&max=50&offset='+Math.addExact(Integer.parseInt(response.completeResponseMap.offset),50)}"
}
}

Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Roua
Regular Contributor III
Regular Contributor III

Thank you all!
it worked with the provided solution thank you:

 "pagination": {
        "nextUrl": {
            "nextUrlPath": "${response?.completeResponseMap?.count < 50 ? null : 'https://xxxxxx.saviyntcloud.com/ECM/api/v5/user?q=accountExpired:0&fields=username,email,displayname&max=50&offset=' + Math.addExact(Integer.parseInt(response.completeResponseMap.offset), 50)}"