You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm one of the administrators of an org with a large amount of users.
I'm currently in the process of extracting all of those users, crunching stats and hopefully making some cleanup, so I reached out to sfcc-ci since I'm using node.js to script.
However, whatever the max count I passed, I didn't manage to get all of my users, hitting a max cap of 4000. (yes, I have more than that. Hence the need to clean that up)
So, i briefly digged into the code and found this line, which is used in the case you're not passing either org or role to filter with (attempting to list all the users you can manage, including the invited ones):
Looks like the page number is harcoded, assuming that whatever number sent out as the page size will be matched by the API.
However, by hitting the API directly (since I had to do that to complete my task anyway), I confirmed that there is a page size limit of 4000 entries. To fix that, code would need to be a bit more complex than it is, performing several requests and aggregating the users until requested count or end of last page is reached.
Regards,
Damien L.
The text was updated successfully, but these errors were encountered:
Hi @dlebreuilly-loreal , thanks for reaching out. I can confirm, that the API has a max page size (which seems to be 4000 here). The CLI offers and option to page the list. Were you able to work with that?
Hi,
I'm one of the administrators of an org with a large amount of users.
I'm currently in the process of extracting all of those users, crunching stats and hopefully making some cleanup, so I reached out to sfcc-ci since I'm using node.js to script.
However, whatever the max count I passed, I didn't manage to get all of my users, hitting a max cap of 4000. (yes, I have more than that. Hence the need to clean that up)
So, i briefly digged into the code and found this line, which is used in the case you're not passing either org or role to filter with (attempting to list all the users you can manage, including the invited ones):
var endpoint = '/users?page=0&size=' + size;
https://github.com/SalesforceCommerceCloud/sfcc-ci/blob/7eacb62016aa14e3ab1c0871370d2be5c0797815/lib/user.js#L249C48-L249C48
Looks like the page number is harcoded, assuming that whatever number sent out as the page size will be matched by the API.
However, by hitting the API directly (since I had to do that to complete my task anyway), I confirmed that there is a page size limit of 4000 entries. To fix that, code would need to be a bit more complex than it is, performing several requests and aggregating the users until requested count or end of last page is reached.
Regards,
Damien L.
The text was updated successfully, but these errors were encountered: