goauthentik / goauthentik/authentik

API Bulk update for users and groups

Open
#10,694 1 comment 0 reactions 0 assignees View on GitHub
enhancement enhancement/confirmed
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

**Is your feature request related to a problem? Please describe.**
I integrated the Authentik API in one of our tools. In one use case I need to update a attribute of all users that have a certain value of that attribute and are in a defined group. In my test scenarios these are around 1000 users. At the moment I fetch each user, update the attribute value (so I don't overwrite the complete field) and update it via the API. Authentik breaks after some updates with the error:

```
{"error":"context canceled","event":"failed to proxy to backend","level":"warning","logger":"authentik.router","timestamp":"2024-07-31T07:18:21Z"}
```

**Describe the solution you'd like**
It would be nice to have a PUT route to update attribute values of all users / groups with a certain value for a defined attribute.

**Describe alternatives you've considered**
I considered doing it directly within the database via a SQL query. Something like

```
UPDATE authentik_core_user
set attributes['my_attribute'] = to_jsonb(15);
WHERE
attributes->>'my_attribute' = 14
```

**Additional context**
/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.