如何更改用户状态 FORCE_CHANGE_PASSWORD? [英] How to change User Status FORCE_CHANGE_PASSWORD?

查看:39
本文介绍了如何更改用户状态 FORCE_CHANGE_PASSWORD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 AWS Cognito,我想创建虚拟用户以进行测试.

Using AWS Cognito, I want to create dummy users for testing purposes.

然后我使用 AWS 控制台来创建这样的用户,但该用户的状态设置为 FORCE_CHANGE_PASSWORD.使用该值,无法对该用户进行身份验证.

I then use the AWS Console to create such user, but the user has its status set to FORCE_CHANGE_PASSWORD. With that value, this user cannot be authenticated.

有没有办法改变这个状态?

Is there a way to change this status?

更新从 CLI 创建用户时的行为相同

UPDATE Same behavior when creating user from CLI

推荐答案

这终于被添加到 AWSCLI:https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-set-user-password.html

This has finally been added to AWSCLI: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-set-user-password.html

您可以使用以下方法更改用户的密码和更新状态:

You can change a user's password and update status using:

aws cognito-idp admin-set-user-password
  --user-pool-id <your-user-pool-id> 
  --username <username> 
  --password <password> 
  --permanent

在使用此之前,您可能需要使用以下方法更新您的 AWS CLI:

pip3 install awscli --upgrade

这篇关于如何更改用户状态 FORCE_CHANGE_PASSWORD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆