You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This migration replaces live Graph requests with SQL over direct, eligible, and expanded group assignments, but assessment 21814 has no Pester coverage. Add database-backed cases for synced/cloud-only users, duplicate roles, group-expanded assignments, and an empty result, following the assessment-test pattern in code-tests/test-assessments/Test-Assessment.21868.Tests.ps1.
Count distinct privileged users instead of role assignments
SELECT DISTINCT still returns one row per role because roleDisplayName is selected, so a synced account assigned to multiple privileged roles is counted multiple times here. The message therefore reports role assignments as “privileged users”; count distinct user IDs while retaining the per-role rows for the table.
The computed count at line 65 therefore counts role rows, not distinct people. One synchronized user assigned two privileged roles was reported as two privileged users. This is a data-count issue, not a wording review.
The base implementation also counted users separately within each role, so this is an inherited limitation, not a new blocker. Keep the role rows for the table and use unique user IDs for a future user count correction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec-21814