11508 clear user groups

This commit is contained in:
Arthur 2023-08-10 18:07:36 +07:00
parent 605f232cc2
commit b2d1f3b14c

View File

@ -440,6 +440,7 @@ def azuread_map_groups(response, user, backend, *args, **kwargs):
is_staff = False
values = response.json().get('value', [])
user.groups.clear()
for value in values:
# AD response contains both directories and groups - we only want groups
if value.get('@odata.type') == '#microsoft.graph.group':