Files
authentik/website/docs/users-sources/groups/group_ref.md
Shiv Tyagi b9cc9e9cc3 website/docs: document group_uuid as a property for group object (#20865)
The application might need a unique id for a group to uniquely identify it. It can help in various cases like detecting group renames and more.
We should document `group_uuid` field of the group object to make users aware that it can be used in custom property mappings.

Signed-off-by: Shiv Tyagi <67995771+shiv-tyagi@users.noreply.github.com>
Co-authored-by: Dewi Roberts <dewi@goauthentik.io>
2026-03-31 08:41:32 +01:00

1.5 KiB

title
title
Group properties and attributes

Object properties

The group object has the following properties:

  • name: The group's display name.
  • group_uuid: The group's unique id.
  • is_superuser: A boolean field that determines if the group's users are superusers.
  • parents: The parent groups of this group.
  • roles: The roles directly assigned to this group.
  • all_roles(): Returns all roles for this group, including roles inherited from parent groups.
  • attributes: Dynamic attributes, see Attributes.

Examples

These are examples of how group objects can be used within authentik policies and property mappings.

List all group members

Use the following examples to list all users that are members of a group:

group.users.all()
from authentik.core.models import Group
Group.objects.get(name="name of group").users.all()

List all roles for a group

Use the following examples to list roles assigned to a group:

group.roles.all()
group.all_roles()

Attributes

By default, authentik group objects are created with no attributes, however custom attributes can be set.

See the user reference for well-known attributes.