From 66c5b7380d1f0bdf7d1a1c67dbbded52c2c392bc Mon Sep 17 00:00:00 2001 From: gerhardj-b <110168424+gerhardj-b@users.noreply.github.com> Date: Thu, 20 Nov 2025 01:58:53 +0100 Subject: [PATCH] feat: allow flat claims instead of nested claims as alternative (#19286) --- backend/open_webui/utils/oauth.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 169042e816..5add660bdf 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -1023,6 +1023,10 @@ class OAuthManager: for nested_claim in nested_claims: claim_data = claim_data.get(nested_claim, {}) + # Try flat claim structure as alternative + if not claim_data: + claim_data = user_data.get(oauth_claim, {}) + oauth_roles = [] if isinstance(claim_data, list):