By using AWS re:Post, you agree to the Terms of Use

AWS Cognito - .NET Framework


I'm trying to connect to AWS Cognito from a .net Framework project.

I can sign up succesfully but when I need to sign in, throws me an error: "User pool {userPool} client does not exist".

This is my code:

private async Task<bool> CheckPasswordAsync(string userName, string password)

                var authReq = new AdminInitiateAuthRequest
                    UserPoolId = ConfigurationManager.AppSettings["USERPOOL_ID"],
                    ClientId = ConfigurationManager.AppSettings["CLIENT_ID"],
                    AuthFlow = AuthFlowType.ADMIN_NO_SRP_AUTH,
                authReq.AuthParameters.Add("USERNAME", userName);
                authReq.AuthParameters.Add("PASSWORD", password);

                AdminInitiateAuthResponse authResp = await _client.AdminInitiateAuthAsync(authReq);

                var auts = authResp;
                return true;
            catch(Exception ex)
                var exc = ex.Message;
                return false;

I don't know if I need to add more information to the method.

The user pool exists and is the same that I have in appSettings.

Any idea about what's wrong?

Thanks in advance.

1 Answer


Thank you for your question.

Your code is missing some prerequisite steps needed to register the user pool. I have attached a document that shows the step by step on how to register and authenticate with Cognito user pools. I have also included a document that contains code examples.


answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions