---
title: Account Lockout node
description: Locks or unlocks a user account profile in PingAM, supporting both persistent and duration-based lockout.
component: platform
version: 7.5
page_id: platform:auth-node-ref:account-lockout
canonical_url: https://docs.pingidentity.com/platform/7.5/auth-node-ref/account-lockout.html
llms_txt: https://docs.pingidentity.com/platform/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["Nodes &amp; Trees", "Journeys", "Accounts", "User Profiles", "Authentication"]
page_aliases: ["auth-node-account-lockout.adoc"]
section_ids:
  availability: Availability
  inputs: Inputs
  dependencies: Dependencies
  configuration: Configuration
  outputs: Outputs
  outcomes: Outcomes
  errors: Errors
  example: Example
---

# Account Lockout node

The Account Lockout node locks or unlocks the authenticating user's account profile.

The node also determines whether the account has been locked through both persistent (physical) lockout and duration lockout. For more information, refer to [Account lockout for trees](https://docs.pingidentity.com/pingam/7.5/am-authentication/about-authentication-trees.html#account-lockout-trees).

|   |                                                                                                                                                       |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | You can also use the [Account Active Decision node](account-active-decision.html) to check whether the account is locked at any point in the journey. |

## Availability

| Product                               | Available? |
| ------------------------------------- | ---------- |
| PingOne Advanced Identity Cloud       | Yes        |
| PingAM (self-managed)                 | Yes        |
| Ping Identity Platform (self-managed) | Yes        |

## Inputs

This node requires the `username` property in the incoming node state. It uses this information to access the account status in the user profile.

It also requires the `realm` property, which Ping Identity Platform sets by default.

## Dependencies

This node depends on the underlying identity service that stores the user profile.

## Configuration

| Property    | Usage                                                                           |
| ----------- | ------------------------------------------------------------------------------- |
| Lock Action | Choose whether to `LOCK` or `UNLOCK` the authenticating user's account profile. |

## Outputs

This node does not change the shared node state.

## Outcomes

Single outcome path; the node updates the account status according to the configured Lock Action:

* `LOCK`

  The account is inactive and the user cannot authenticate.

* `UNLOCK`

  The account is active and the user can authenticate.

## Errors

If this node fails to set the account status, it logs a `failed to set the user status inactive` warning.

This node can also throw exceptions with the following messages:

| Message                                                                     | Notes                                                                               |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `Could not get a valid username from the context`                           | Failed to read the `username` from the shared node state                            |
| `Could not get a valid realm from the context`                              | Failed to read the `realm` from the shared node state                               |
| `Could not find the identity based on the information available on context` | Failed to find the account profile with this `username` in this `realm`             |
| `An error occurred when trying to lock out the user account`                | Failed to update the account status; applies when locking and unlocking the account |

## Example

The following simple example uses this node with the [Retry Limit Decision node](retry-limit-decision.html) to lock an account after the set number of invalid attempts:

![Lock an account after too many authentication failures](_images/retry-limit-decision-journey.png)

The [Retry Limit Decision node](retry-limit-decision.html) Retry limit (default: 3) defines the number of failed attempts before lockout.

Before using a journey like this in deployment, adapt it to reset the retry count on successful authentication.
