Give an IAM user console access
Give an IAM user a console password, so a person signs in with your organization's alias and a user name, without an email account of their own.
Use it for a contractor, a shared operations login, or anyone you would rather not invite by email address. Replace alice with the IAM user's name.
Prerequisites
- Permission for
iam:CreateLoginProfileon the user. In the console, alsoiam:GetUseron the user to open its page (without it the page is not found) andiam:GetLoginProfileon the user: without it the Console access tab shows only that your policies do not grant it. - In the console, also
iam:ListUsersto open Users (without it the list says you do not have permission to list IAM users). - An IAM user of type User, active, that no person signs in to with their own email account (see Create an IAM user). Service accounts sign in with access keys.
- Console passwords for IAM users are on, and no single sign-on connection of your organization is enforced (see Set the password policy).
Turn on console access
- Open Identity, choose Users, then choose alice.
- Choose Console access.
- Under Password, choose Generate one (shown once), or choose Type one and enter it for New password.
- Keep Ask for a new password at the next sign-in selected, so only the user knows the password they use.
- Choose Turn on console access.
- A generated password is shown once. Copy it, then choose Done.
dcloud iam users create-login-profile user-id --generate-passwordPOST /iam/api/users/user-id/login-profile
{ "generatePassword": true, "passwordResetRequired": true }A generated password is in generatedPassword, once.
resource "dcloud_iam_user_login_profile" "alice" {
user_id = dcloud_iam_user.alice.id
generate_password = true
password_reset_required = true
}The generated password is in generated_password, kept in the state.
Result
The tab shows How they sign in: the Sign-in link (https://<console host>/login/<alias>),
the Organization alias (your organization's slug) and the User name. Send them the link and
the user name, and hand the password over separately.
They sign in at that link, or on the sign-in page with Sign in with a user name from your organization, with Organization alias or ID, User name and Password. With a new password due, they first see Choose a new password. If your organization has Require two-factor sign-in on, they are sent to set up an authenticator app before they use the console.
A generated password has 20 characters, or the policy's minimum length if that is longer, and leaves out look-alike characters. A password you type must meet the password policy and may not be the user name or the organization alias.
The IAM user acts only in your organization and only with what its policies allow: an IAM user with no policies can sign in and do nothing. It cannot reset its password by email. Its sign-ins and failures are in the audit log.
If it is refused
- 409
Service accounts sign in with access keys, not a console password. - 409
This IAM user is suspended (for example a former member) and cannot be given console access. Invite the person again, or create a new IAM user. - 409
This IAM user belongs to a person who signs in with their own email account. - 409
This IAM user already has a console password. Reset it instead. - 409
Another IAM user in this organization is also called "alice". User names must be unique to sign in with them. - 409
Your organization has turned off console passwords for IAM users. Ask your administrator how to sign in.orYour organization signs in with single sign-on, so IAM-user console passwords are off. Ask your administrator. - 400
The password does not meet the organization's policy: …, with each rule broken, such asUse at least 12 characters. - 400
Give either password or generatePassword: truewhen the request has neither, or both.