website/docs/users-sources/groups/group_ref.md
The group object has the following properties:
name: The group's display name.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.These are examples of how group objects can be used within authentik policies and property mappings.
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()
Use the following examples to list roles assigned to a group:
group.roles.all()
group.all_roles()
By default, authentik group objects are created with no attributes, however custom attributes can be set.
See the user reference for well-known attributes.