microsoft / microsoft/CSS-Exchange

HealthChecker: False positive "Duplicate Overrides" error when ServerMismatch overrides exist

Open Beginner friendly
#2,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Health Checker Issue
Dominant language
PowerShell
Stars
1.3k
Forks
395
Avg merge
14h 7m
Merged PRs (30d)
5

Description

Summary

The HealthChecker reports a false positive "Duplicate Overrides" error when multiple Setting Overrides exist for the same ComponentName/SectionName/Parameter but are targeted at different servers. Overrides with Status = ServerMismatch (meaning they don't apply to the server being analyzed) are incorrectly included in the duplicate detection logic.

Steps to Reproduce

  1. Have two or more Exchange servers (e.g., Server-A and Server-B).
  2. Create per-server Setting Overrides that target the same component/section/parameter (e.g., via the Flighting Service), such as:
    • FlightingServiceOverride_Server-A_F1.1 targeting Server-A
    • FlightingServiceOverride_Server-B_F1.1 targeting Server-B
  3. Run HealthChecker against either server.

Expected Behavior

Each server should only evaluate overrides that apply to it (i.e., Status = Accepted). Since only one override per server is Accepted, no duplicate should be flagged.

Actual Behavior

Both servers show the red error:

Error! Duplicate Overrides have been detected for the same parameter causing possible misconfigurations. Please address as soon as possible.

This happens because when Server-A is analyzed, it sees:

Override Name ComponentName SectionName Status Parameters
FlightingServiceOverride_Server-B_F1.1 Global ExchangeOnpremAsThirdPartyAppId ServerMismatch Enabled=true
FlightingServiceOverride_Server-A_F1.1 Global ExchangeOnpremAsThirdPartyAppId Accepted Enabled=true

Both entries are grouped together and the parameter Enabled appears twice, triggering the duplicate detection — even though only one override actually applies to the server.

Root Cause

In Invoke-AnalyzerExchangeInformation.ps1, the duplicate detection groups all SimpleSettingOverrides without filtering out ServerMismatch entries:

https://github.com/microsoft/CSS-Exchange/blob/33dc4360e36882cb72148cc1c9ea40360c5ac904/Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerExchangeInformation.ps1#L738-L740

The ServerMismatch status means the override is targeted at a different server and does not apply. It should be excluded before grouping, similar to how Get-FilteredSettingOverrideInformation.ps1 already filters on Status -eq "Accepted" for its callers.

The Status property is populated by Get-ExchangeSettingOverride.ps1 directly from the Exchange diagnostic XML.

Suggested Fix

Add a Where-Object filter before the Group-Object to exclude ServerMismatch overrides:

$groupedResults = $exchangeInformation.SettingOverrides.SimpleSettingOverrides |
    Where-Object { $_.Status -ne "ServerMismatch" } |
    Group-Object ComponentName, SectionName |
    Where-Object { $_.Count -gt 1 }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerExchangeInformation.ps1 around lines 738-776, and compare its duplicate-detection input with the filtering in Get-FilteredSettingOverrideInformation.ps1 around lines 89-92. Use the HealthChecker entry point with per-server overrides from the reproduction, and confirm that ServerMismatch entries no longer cause a duplicate error while Accepted duplicates remain detectable.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.