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
已提问 1 年前44 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则