create

Definition

Creates a user.

Usage

$ airflow users create [-h] -e EMAIL -f FIRSTNAME -l LASTNAME [-p PASSWORD] -r
                     ROLE [--use-random-password] -u USERNAME [-v]

Arguments

Parameter Description

-e, --email

Email of the user

-f, --firstname

First name of the user

-l, --lastname

Last name of the user

-p, --password

Password of the user, required to create a user without using the --use-random-password option

-r, --role

Role of the user. Existing roles include Admin, User, Op, Viewer, and Public

--use-random-password

Use random string as a password. Required when creating a user without the --password option

-u, --username

Username of the user

-v, --verbose

Make logging output more verbose. Default: False

Examples

To create a user with the admin role, run:

$ airflow users create -e user@user.com -f john -l doe -p user1 -r Admin -u user1

Output example:

[2025-04-03T11:13:35.841+0000] {manager.py:212} INFO - Added user user1
User "user1" created with role "Admin"
Found a mistake? Seleсt text and press Ctrl+Enter to report it