# BAPI_USER_UNLOCK — Unlock User

> Removes the administrator lock of a user and the lock caused by failed logon attempts. Self-service password and unlock applications and identity management interfaces use it. It does not reset the password; it requires S_USER_GRP authorization and the result is returned in the RETURN table.

- Modules: BASIS
- Type: BAPI
- Function group: SU_USER
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-user-unlock/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| USERNAME | BAPIBNAME-BAPIBNAME | User name | Yes |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | Yes |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_USER_UNLOCK'
  EXPORTING
    username = lv_username
  TABLES
    return = lt_return.
```

## Related tables

USR02

