mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
11508 clear user groups
This commit is contained in:
parent
605f232cc2
commit
b2d1f3b14c
@ -440,6 +440,7 @@ def azuread_map_groups(response, user, backend, *args, **kwargs):
|
|||||||
is_staff = False
|
is_staff = False
|
||||||
values = response.json().get('value', [])
|
values = response.json().get('value', [])
|
||||||
|
|
||||||
|
user.groups.clear()
|
||||||
for value in values:
|
for value in values:
|
||||||
# AD response contains both directories and groups - we only want groups
|
# AD response contains both directories and groups - we only want groups
|
||||||
if value.get('@odata.type') == '#microsoft.graph.group':
|
if value.get('@odata.type') == '#microsoft.graph.group':
|
||||||
|
Loading…
Reference in New Issue
Block a user