AmazonCognitoIdentityProviderClient.ListUsersInGroupAsync returns a set of 25 users max when there is no limit specified

0

Hi,

Within our Asp.Net MVC Core application, we are using the AWSSDK.CognitoIdentityProvider (version 3.7.101.74).

For one of our use cases, we want to have a list of all users which belong to a certain role/group. Therefore, we use the AmazonCognitoIdentifyProviderClient.ListUsersInGroupAsync method. When calling this method without setting the limit property on the ListUsersInGroupRequest , we expect it will return a list of users belonging to that role/group with a max count of 60 users. Why 60? Because there is a max on the limit property of 60 defined in the api which makes us implicitly think it will not return more then 60 users per request.

However, when we do not set the limit property on the ListUsersInGroupRequest, we always get a list with max 25 users returned. This default of 25 is not documented anywhere which makes it confusing/unclear, what the expected behaviour of the api is when not specifying the limit properety on ListUsersInGroupRequest.

Is it correct to assume the default for limit is 25? If so, can this be documented correctly in the api documentation so expected behaviour is clear?

Thanks in advance

This request will return a list of max 25 users

var usersInGroup = await this.adminAmazonCognitoIdentityProviderClient.ListUsersInGroupAsync(new ListUsersInGroupRequest()
{
   GroupName = "SomeUserGroup",
   UserPoolId = "SomeUserPool"
);

This request will return a list of max 60 users

var usersInGroup = await this.adminAmazonCognitoIdentityProviderClient.ListUsersInGroupAsync(new ListUsersInGroupRequest()
{
   GroupName = "SomeUserGroup",
   UserPoolId = "SomeUserPool",
   Limit = 60
);
Tom B
gefragt vor einem Jahr44 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen