-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
ORCA tests report incorrect failures in Pester/HTML output when using certificate-based service principal authentication, despite the same tests passing when run individually or with interactive authentication.
Environment
- Maester Version: 2.0.0
- PowerShell Version: 7.x
- Authentication Method: Certificate-based with service principal
- Connection: Custom script using Connect-ExchangeOnline, Connect-MgGraph, etc. with certificate thumbprint
Steps to Reproduce
- Connect using service principal with certificate authentication
- Run Invoke-Maester -SkipGraphConnect
- Observe ORCA tests show failures in HTML report
- Run individual ORCA tests (e.g., Test-ORCA106) - they pass and show correct results
- Compare with Connect-Maester -Services All (interactive) - ORCA tests pass correctly
Expected Behavior
ORCA tests should report accurate pass/fail results regardless of authentication method
Actual Behavior
- Interactive auth: ORCA tests pass correctly in HTML
- Service principal auth: Majority of ORCA tests report as failures in HTML/Pester output
- Running tests individually with service principal: Tests pass and show correct evaluation
- Manually verified configurations match expected values
Diagnostic Information
- Test-MtConnection returns True for all services (Graph, ExchangeOnline, SecurityCompliance, Azure)
- Verbose output shows:
VERBOSE: OrcaCache not set, Get-ORCACollectionon every test (cache not persisting) - Non-ORCA tests (EIDSCA, CIS, CISA, Maester) work correctly with service principal
- All required API permissions and RBAC roles configured
Additional Context
- 99 ORCA tests reported as failed with service principal
- Many tests pass when run with Connect-Maester (interactive)
- Suggests issue in ORCA test framework's handling of service principal context in Pester runs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working