diff --git a/LibreNMS/Authentication/ADAuthorizationAuthorizer.php b/LibreNMS/Authentication/ADAuthorizationAuthorizer.php index 40ab8f40d21e..4695b7b5eba2 100644 --- a/LibreNMS/Authentication/ADAuthorizationAuthorizer.php +++ b/LibreNMS/Authentication/ADAuthorizationAuthorizer.php @@ -112,7 +112,11 @@ public function getRoles(string $username): array|false // collect all roles $auth_ad_groups = Config::get('auth_ad_groups'); - foreach ($entries[0]['memberof'] as $entry) { + foreach ($entries[0]['memberof'] as $index => $entry) { + if ($index == 'count') { + continue; // skip count entry + } + $group_cn = $this->getCn($entry); if (isset($auth_ad_groups[$group_cn]['roles']) && is_array($auth_ad_groups[$group_cn]['roles'])) {