<!--
SPDX-FileCopyrightText: 2025 DB Systel GmbH
SPDX-License-Identifier: Apache-2.0
-->
# Authentik User Manager

[](https://github.com/OpenRailAssociation/authentik-user-manager/actions/workflows/test.yaml)
[](https://api.reuse.software/info/github.com/OpenRailAssociation/authentik-user-manager)
[](https://pypi.org/project/authentik-user-manager/)
[](https://pypi.org/project/authentik-user-manager/)
Manage Authentik users and group memberships via YAML configuration files.
## Features
- Synchronize users and group memberships with Authentik instance
- Configure users and their group memberships via YAML files
- Create individual invitation links for new users
- Email notification system for user invitations
## Installation
### Install and run via pipx (Recommended)
[pipx](https://pypa.github.io/pipx/) makes installing and running Python programs easier and avoids conflicts with other packages. Install it with:
```sh
pip3 install pipx
```
The following one-liner both installs and runs this program from [PyPI](https://pypi.org/project/authentik-user-manager/):
```sh
pipx run authentik-user-manager
```
If you want to use authentik-user-manager without prepending it with `pipx run` every time, install it globally:
```sh
pipx install authentik-user-manager
```
To upgrade authentik-user-manager to the newest available version:
```sh
pipx upgrade authentik-user-manager
```
### Other installation methods
You may also use pip directly:
```bash
pip install authentik-user-manager
```
## CLI Usage
authentik-user-manager provides a command-line interface for synchronizing users and their group memberships with an Authentik instance.
### Command Structure
```sh
auth-user-mgr <command> [options]
```
### Main Commands
#### sync
Synchronize users with the Authentik instance:
```sh
auth-user-mgr sync -c <config_file> -u <users_file_or_directory>
```
For detailed help on any command with additional flags such as `--dry` and `--no-email`:
```bash
auth-user-mgr --help
auth-user-mgr sync --help
```
### Configuration
The application's configuration and the list of managed users are stored in YAML files. You can find sample configuration files in the [`config/`](./config/) directory.
Note: There are two ways how to store your users inventory:
1. In a single file, as shown in [`config/users.sample.yaml`](./config/users.sample.yaml)
1. In multiple files in one directory, as shown in [`config/users.sample/`](./config/users.sample/)
#### API permissions
Especially for automated syncs, it is recommended to set up a system user in Authentik and create an API token for them. The following permissions are required:
- User: Can view User
- Group: Can view Group
- Group: Add user to group
- Group: Remove user from group
- Group: Can add Group
- Flow: Can view Flow
- Invitation: Can view Invitation
- Invitation: Can add Invitation
- Invitation: Can delete Invitation
## Development and Contribution
We welcome contributions to improve this library. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for all information.
## License
The content of this repository is licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
There may be components under different, but compatible licenses or from different copyright holders. The project is REUSE compliant which makes these portions transparent. You will find all used licenses in the LICENSES directory.
The project has been started by the [OpenRail Association](https://openrailassociation.org). You are welcome to contribute!
Raw data
{
"_id": null,
"home_page": "https://github.com/OpenRailAssociation/authentik-user-manager",
"name": "authentik-user-manager",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "authentik, user-management",
"author": "Max Mehl",
"author_email": "max.mehl@deutschebahn.com",
"download_url": "https://files.pythonhosted.org/packages/0d/b9/24504d3eddd5f209acfea4bfa83e1673efb1472209e2b3d69dd50e9b8f7d/authentik_user_manager-1.0.5.tar.gz",
"platform": null,
"description": "<!--\nSPDX-FileCopyrightText: 2025 DB Systel GmbH\n\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Authentik User Manager\n\n\n[](https://github.com/OpenRailAssociation/authentik-user-manager/actions/workflows/test.yaml)\n[](https://api.reuse.software/info/github.com/OpenRailAssociation/authentik-user-manager)\n[](https://pypi.org/project/authentik-user-manager/)\n[](https://pypi.org/project/authentik-user-manager/)\n\nManage Authentik users and group memberships via YAML configuration files.\n\n## Features\n\n- Synchronize users and group memberships with Authentik instance\n- Configure users and their group memberships via YAML files\n- Create individual invitation links for new users\n- Email notification system for user invitations\n\n## Installation\n\n### Install and run via pipx (Recommended)\n\n[pipx](https://pypa.github.io/pipx/) makes installing and running Python programs easier and avoids conflicts with other packages. Install it with:\n\n```sh\npip3 install pipx\n```\n\nThe following one-liner both installs and runs this program from [PyPI](https://pypi.org/project/authentik-user-manager/):\n\n```sh\npipx run authentik-user-manager\n```\n\nIf you want to use authentik-user-manager without prepending it with `pipx run` every time, install it globally:\n\n```sh\npipx install authentik-user-manager\n```\n\nTo upgrade authentik-user-manager to the newest available version:\n\n```sh\npipx upgrade authentik-user-manager\n```\n\n### Other installation methods\n\nYou may also use pip directly:\n\n```bash\npip install authentik-user-manager\n```\n\n## CLI Usage\n\nauthentik-user-manager provides a command-line interface for synchronizing users and their group memberships with an Authentik instance.\n\n### Command Structure\n\n```sh\nauth-user-mgr <command> [options]\n```\n\n### Main Commands\n\n#### sync\n\nSynchronize users with the Authentik instance:\n\n```sh\nauth-user-mgr sync -c <config_file> -u <users_file_or_directory>\n```\n\nFor detailed help on any command with additional flags such as `--dry` and `--no-email`:\n\n```bash\nauth-user-mgr --help\nauth-user-mgr sync --help\n```\n\n### Configuration\n\nThe application's configuration and the list of managed users are stored in YAML files. You can find sample configuration files in the [`config/`](./config/) directory.\n\nNote: There are two ways how to store your users inventory:\n\n1. In a single file, as shown in [`config/users.sample.yaml`](./config/users.sample.yaml)\n1. In multiple files in one directory, as shown in [`config/users.sample/`](./config/users.sample/)\n\n#### API permissions\n\nEspecially for automated syncs, it is recommended to set up a system user in Authentik and create an API token for them. The following permissions are required:\n\n- User: Can view User\n- Group: Can view Group\n- Group: Add user to group\n- Group: Remove user from group\n- Group: Can add Group\n- Flow: Can view Flow\n- Invitation: Can view Invitation\n- Invitation: Can add Invitation\n- Invitation: Can delete Invitation\n\n\n## Development and Contribution\n\nWe welcome contributions to improve this library. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for all information.\n\n\n## License\n\nThe content of this repository is licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).\n\nThere may be components under different, but compatible licenses or from different copyright holders. The project is REUSE compliant which makes these portions transparent. You will find all used licenses in the LICENSES directory.\n\nThe project has been started by the [OpenRail Association](https://openrailassociation.org). You are welcome to contribute!\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Managing Authentik users via YAML files",
"version": "1.0.5",
"project_urls": {
"Homepage": "https://github.com/OpenRailAssociation/authentik-user-manager",
"Repository": "https://github.com/OpenRailAssociation/authentik-user-manager"
},
"split_keywords": [
"authentik",
" user-management"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "904daffe03ae4941b8323a56601cfdef6b140a352a0d362ab6277c01bacd44a0",
"md5": "a848063cb394eeb3c114cbd173b0ef04",
"sha256": "deb5b4b9ddfc8edd0021c0a042c50282370495b482fb66e98173c3e4c3bcdd83"
},
"downloads": -1,
"filename": "authentik_user_manager-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a848063cb394eeb3c114cbd173b0ef04",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 33097,
"upload_time": "2025-07-22T13:14:41",
"upload_time_iso_8601": "2025-07-22T13:14:41.644078Z",
"url": "https://files.pythonhosted.org/packages/90/4d/affe03ae4941b8323a56601cfdef6b140a352a0d362ab6277c01bacd44a0/authentik_user_manager-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0db924504d3eddd5f209acfea4bfa83e1673efb1472209e2b3d69dd50e9b8f7d",
"md5": "c85ffe167a22502ec79065381c73004d",
"sha256": "0a08e9d3d8755100354eb8b5712ed29a614252354c49eb8d6c8c4f98264f7111"
},
"downloads": -1,
"filename": "authentik_user_manager-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "c85ffe167a22502ec79065381c73004d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 25008,
"upload_time": "2025-07-22T13:14:42",
"upload_time_iso_8601": "2025-07-22T13:14:42.474360Z",
"url": "https://files.pythonhosted.org/packages/0d/b9/24504d3eddd5f209acfea4bfa83e1673efb1472209e2b3d69dd50e9b8f7d/authentik_user_manager-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-22 13:14:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OpenRailAssociation",
"github_project": "authentik-user-manager",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "authentik-user-manager"
}