diff --git a/support/cas-server-support-aws-cognito-authentication/src/main/java/org/apereo/cas/authentication/AmazonCognitoAuthenticationAuthenticationHandler.java b/support/cas-server-support-aws-cognito-authentication/src/main/java/org/apereo/cas/authentication/AmazonCognitoAuthenticationAuthenticationHandler.java
index <HASH>..<HASH> 100644
--- a/support/cas-server-support-aws-cognito-authentication/src/main/java/org/apereo/cas/authentication/AmazonCognitoAuthenticationAuthenticationHandler.java
+++ b/support/cas-server-support-aws-cognito-authentication/src/main/java/org/apereo/cas/authentication/AmazonCognitoAuthenticationAuthenticationHandler.java
@@ -82,8 +82,8 @@ public class AmazonCognitoAuthenticationAuthenticationHandler extends AbstractUs
             }
 
             val userResult = cognitoIdentityProvider.adminGetUser(AdminGetUserRequest.builder()
-                .userPoolId(credential.getUsername())
-                .userPoolId(properties.getUserPoolId()).build());
+                .userPoolId(properties.getUserPoolId())
+                .username(credential.getUsername()).build());
 
             val attributes = new LinkedHashMap<String, List<Object>>();
             attributes.put("userStatus", CollectionUtils.wrap(userResult.userStatusAsString()));
Amazon Cognito Authentication: fix adminGetUser (#<I>)

(cherry picked from commit <I>f<I>aaaff<I>f<I>a2f<I>f<I>bd<I>fc0b)