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
질문됨 일 년 전44회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠