Skip to content

Conversation

@mrdos010
Copy link
Contributor

@mrdos010 mrdos010 commented Jan 5, 2026

RoleEligibilitySchedule.ReadWrite.Directory is no longer used and is not included in Get-MtGraphScope.

The existing scope check was therefore invalid and caused the test to always be skipped.
This PR removes the outdated check so the test can run correctly.

Remove check for RoleEligibilitySchedule.ReadWrite.Directory scope

For more context on the reason see maester365#195 (comment)
@mrdos010 mrdos010 requested a review from a team as a code owner January 5, 2026 14:09
RoleEligibilitySchedule.ReadWrite.Directory is no longer used and is not included in [Get-MtGraphScope](https://github.com/maester365/maester/blob/main/powershell/public/Get-MtGraphScope.ps1).

The existing scope check was therefore invalid and caused the test to always be skipped. 
This PR removes the outdated check so the test can run correctly.
RoleEligibilitySchedule.ReadWrite.Directory is no longer used and is not included in [Get-MtGraphScope](https://github.com/maester365/maester/blob/main/powershell/public/Get-MtGraphScope.ps1).

The existing scope check was therefore invalid and caused the test to always be skipped. 
This PR removes the outdated check so the test can run correctly.
@mrdos010 mrdos010 changed the title Update Test-MtCisGlobalAdminCount.ps1 remove check for unused scope "RoleEligibilitySchedule.ReadWrite.Directory" Jan 5, 2026
@mrdos010 mrdos010 changed the title remove check for unused scope "RoleEligibilitySchedule.ReadWrite.Directory" Remove the check for the unused scope "RoleEligibilitySchedule.ReadWrite.Directory" Jan 5, 2026
@SamErde SamErde requested a review from Copilot January 5, 2026 17:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes an outdated and invalid scope check for RoleEligibilitySchedule.ReadWrite.Directory that was causing tests to be incorrectly skipped. The scope is not included in Get-MtGraphScope and is not required for the underlying Graph API calls, which use the RoleManagement.Read.All scope instead.

  • Removes invalid permission checks from three test functions
  • Enables tests to run correctly with the standard scopes from Get-MtGraphScope
  • Improves code consistency across test files

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
powershell/public/cisa/entra/Test-MtCisaGlobalAdminRatio.ps1 Removed invalid scope check that was preventing the test from running
powershell/public/cisa/entra/Test-MtCisaCloudGlobalAdmin.ps1 Removed invalid scope check that was preventing the test from running
powershell/public/cis/Test-MtCisGlobalAdminCount.ps1 Removed invalid scope check that was preventing the test from running

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SamErde
Copy link
Contributor

SamErde commented Jan 5, 2026

Thanks, @mrdos010! Looks good. Testing with my lunch today!

@SamErde SamErde merged commit be5127f into maester365:main Jan 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants