From f8abe3e210f2779462cfa1dd19474a8f0fa2ee59 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 8 Feb 2021 11:50:26 +0100 Subject: [PATCH] providers/oauth2: add unofficial groups attribute to default profile claim --- authentik/providers/oauth2/managed.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/providers/oauth2/managed.py b/authentik/providers/oauth2/managed.py index 61e9efd04..873640942 100644 --- a/authentik/providers/oauth2/managed.py +++ b/authentik/providers/oauth2/managed.py @@ -23,6 +23,8 @@ return { "family_name": "", "preferred_username": user.username, "nickname": user.username, + # groups is not part of the official userinfo schema, but is a quasi-standard + "groups": [group.name for group in user.ak_groups.all()], } """