Skip to content

SecOps - 41002 - Microsoft Defender for Identity sensor is installed and healthy on every domain controller#1351

Draft
Manoj-Kesana wants to merge 4 commits into
devfrom
SEC-41002
Draft

SecOps - 41002 - Microsoft Defender for Identity sensor is installed and healthy on every domain controller#1351
Manoj-Kesana wants to merge 4 commits into
devfrom
SEC-41002

Conversation

@Manoj-Kesana

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new SecOps assessment (41002) that queries Microsoft Graph for Microsoft Defender for Identity (MDI) sensor inventory and reports whether domain controller–integrated sensors appear healthy, running, and up-to-date, along with a companion markdown description/remediation page.

Changes:

  • Introduces Test-Assessment-41002, calling security/identities/sensors and generating a summarized markdown table of sensors.
  • Adds Test-Assessment.41002.md to provide the report description and remediation guidance content.

Reviewed changes

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

File Description
src/powershell/tests/Test-Assessment.41002.ps1 New assessment implementation for evaluating MDI sensor inventory via Graph and producing result markdown.
src/powershell/tests/Test-Assessment.41002.md New markdown content used by reporting to describe/remediate the assessment outcome.

Comment thread src/powershell/tests/Test-Assessment.41002.ps1
Comment thread src/powershell/tests/Test-Assessment.41002.ps1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Manoj-Kesana Manoj-Kesana added the ready for review PR is ready for review and merging label Jun 25, 2026
@Manoj-Kesana Manoj-Kesana requested a review from alexandair June 25, 2026 19:19

@alexandair alexandair left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Manoj-Kesana Please, address my feedback.

Standalone DC sensors (domainControllerStandalone) are excluded, producing wrong verdicts.

Test-Assessment.41002.ps1 filters only domainControllerIntegrated:

$allDcSensors = @($sensors | Where-Object { $_.sensorType -eq 'domainControllerIntegrated' })

The security.sensorType enum contains two DC-monitoring values: domainControllerIntegrated and domainControllerStandalone. Microsoft docs confirm the standalone sensor "monitors domain controller traffic via port mirroring" and the FAQ recommends "a Defender for Identity sensor or standalone sensor for each one of your domain controllers" (commonly used for virtual DCs the integrated sensor can't cover). Consequences:

  • False FAIL — a tenant whose DCs are covered by standalone sensors hits $allDcSensors.Count -eq 0"MDI onboarded but no domain controller sensors registered" → Fail, despite full coverage.
  • False PASS — an unhealthy standalone DC sensor is never evaluated; if integrated sensors are healthy the test reports Pass.

Note this gap originates in the spec (it scopes only to domainControllerIntegrated and its Challenges list adfs/adcs/adConnect but omit domainControllerStandalone). Recommend updating both spec and code to include domainControllerStandalone in the DC sensor set — e.g. $_.sensorType -in @('domainControllerIntegrated','domainControllerStandalone') — or explicitly justifying the exclusion in the spec.

Warning

"Every domain represented in the workspace" is not enforced.

The spec's Pass condition requires at least one DC sensor for every domain represented in the workspace. The code treats all DC sensors as a single pool with no per-domainName grouping, so a domain present only via a non-DC sensor (e.g., an AD FS sensor in domain B while DC sensors exist only in domain A) is never flagged. The spec's Challenges acknowledge the API limitation, but the per-domain check that is feasible (every domain appearing in the inventory should have ≥1 DC sensor) isn't implemented. Consider grouping by domainName, or align the spec wording with what's actually checked.

Comment thread src/powershell/tests/Test-Assessment.41002.ps1
1. Sign in to [Microsoft Defender XDR](https://security.microsoft.com) as a Global Administrator or Security Administrator.
2. Navigate to **Settings > Identities > Sensors**.
3. Download the sensor installer and follow [Install the Microsoft Defender for Identity sensor](https://learn.microsoft.com/en-us/defender-for-identity/deploy/install-sensor).
4. For outdated sensors, see [Update Microsoft Defender for Identity sensors](https://learn.microsoft.com/en-us/defender-for-identity/deploy/sensor-settings#sensor-update-process).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

404 - Page not found

@Manoj-Kesana Manoj-Kesana removed the ready for review PR is ready for review and merging label Jun 26, 2026
@Manoj-Kesana Manoj-Kesana marked this pull request as draft June 26, 2026 04:30
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.

3 participants