Skip to content

Intune Anomalies 1.3.0: shared detection core for the Maester pack, permission notices, crash fix - #10

Merged
royklo merged 24 commits into
mainfrom
feat/intune-anomaly-core
Oct 26, 2026
Merged

royklo merged 24 commits into
mainfrom
feat/intune-anomaly-core

Conversation

@royklo

@royklo royklo commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary of changes

Intune Anomalies 1.3.0. The detection logic moves to module/Core, which is shared with the RKSolutions Maester pack (the pack carries its own synced copy, see module/Core/README.md). The public surface stays the same: no cmdlets added or removed, and Get-IntuneAnomaliesReport keeps every parameter.

What admins notice:

  • A tenant without a BitLocker or LAPS policy no longer crashes the report.
  • Missing BitLocker, LAPS or app permissions show a notice instead of flagging every device or stopping the report.
  • Failed required Graph reads stop the report instead of producing a half-empty one.
  • The report no longer stops silently at 10,000 devices or users.
  • -DebugMode has no effect any more; use -Verbose.
  • Deprecated settings take their names from Microsoft Graph instead of a download.

The full list is in CHANGELOG.md under 1.3.0.

New workflow: .github/workflows/sync-maester-pack.yml opens a sync pull request in royklo/maester-pack-rksolutions when module/Core changes on main. It needs the PACK_SYNC_TOKEN secret and the pack repository on GitHub. Set both up before merging, or the first run fails.

Tested:

  • 72 Pester tests pass (CI now runs all of ./Tests), and PSScriptAnalyzer reports no errors.
  • Live on two tenants. Compared with 1.2.2 on a tenant with 100 Windows devices, every category gives the same count except deprecated settings (30 vs 28). Microsoft names two Content Caching settings "(deprecated)" in some tenants and not yet in others.

Related issue

None.

Checklist

  • Tests pass locally (Invoke-Pester ./Tests)
  • Comment-based help is complete for any cmdlet I changed (synopsis, description, parameters, examples)
  • If I added or changed a cmdlet, I updated docs/CMDLET-REFERENCE.md
  • If I added or changed code that calls Microsoft Graph, I updated the cmdlet required scopes and docs/PERMISSIONS.md (see CONTRIBUTING.md)

🤖 Generated with Claude Code

Roy Klooster and others added 23 commits October 25, 2026 22:20
…tuneCoreState

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s core adapters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k, tidy blank lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Test-IntuneFilter into the core

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…module/Core (no behaviour change)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…app policy lookup

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d, scope-gated and best-effort reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e six device and app resolvers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…known reason, null LastContact, no Warnings)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…result with permission notices

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ect, and list Get-RKIntuneAnomaly

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…h policy

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…le/Core changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ncs only Core changes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…false anomalies; settings read falls back to a direct GET

BitLocker and LAPS no longer flag every device when the keys or credentials
cannot be read. A policy settings read that $batch answers with something
other than 200 or 404 is retried as a direct GET. Null child lists no longer
break the deprecated settings walker, and a device that fails projection is
reported as a General warning.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dropped connections and timeouts are retried, the report shows progress while
Graph is read, duplicate notices are merged, and stale comments, the
CHANGELOG, the layout sections and PERMISSIONS.md describe the current code.
Adds tests for Get-RKIntuneAnomaly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ies untouched, keep the error text of a failed batch request

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ummary no longer exists in Graph

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ate changelog line for apps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e cmdlets as 1.2.2

Get-IntuneAnomaliesReport still uses it to collect the data. The Maester pack does not
call it at run time (it carries its own copy of module/Core).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 04:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cross-repository compatibility remains unverified, and unresolved Cloud PC classification and permission-diagnosis issues need correction.

2 open issues
What changed in this PR

Intune Anomalies 1.3.0 separates detection from HTML reporting so the module and Maester pack can share a detection core while preserving the public cmdlet interface.

Changes:

  • Extracts collectors, resolvers, assignment helpers, and Graph adapters into reusable components.
  • Adds permission notices, stricter required-read handling, complete device/user paging, and empty-policy fixes.
  • Expands tests and adds automated core synchronization to the Maester pack.
File Description
Tests/​IntuneAnomalyCore.Tests.ps1 Tests core logic, adapters, errors, and output contracts.
Tests/​Consistency.Tests.ps1 Adapts resolver tests to the new data contract.
README.md Documents the core and test directories.
module/​RKSolutions.psm1 Loads adapters, extracted helpers, and core state.
module/​RKSolutions.psd1 Updates the version and release notes.
module/​README.md Updates the module layout.
module/​Public/​Get-IntuneAnomaliesReport.ps1 Uses consolidated results and renders notices.
module/​Private/​RKCoreGraphAdapter.ps1 Implements paging, retries, and batch adaptation.
module/​Private/​IntuneEnrollmentFlows.ps1 Moves shared assignment helpers into Core.
module/​Private/​IntuneAnomalies.ps1 Retains HTML rendering and adds notices.
module/​Private/​Get-RKIntuneAnomaly.ps1 Combines category results and readability flags.
module/​Private/​Get-ApplicationFailures.ps1 Extracts application-failure collection.
module/​Core/​RKCoreGraph.ps1 Adds shared URI and Graph error helpers.
module/​Core/​README.md Defines shared-core constraints and sync guidance.
module/​Core/​IntunePolicyAssignment.ps1 Houses shared assignment and filter evaluation.
module/​Core/​IntuneAnomalyResolvers.ps1 Separates detection from collection and rendering.
module/​Core/​IntuneAnomalyCollector.ps1 Collects shared data with explicit error handling.
module/​Core/​Initialize-RKIntuneCoreState.ps1 Initializes caches and detection lookup tables.
docs/​CMDLET-REFERENCE.md Documents the inactive DebugMode switch.
CHANGELOG.md Records 1.3.0 changes and fixes.
.github/​workflows/​sync-maester-pack.yml Opens or updates a pack synchronization PR.
.github/​workflows/​build-and-test.yml Runs the full Tests directory.

Review effort: Balanced

Comment thread module/Core/IntuneAnomalyCollector.ps1 Resolved
…s say access denied

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 05:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The shared-core refactor needs human validation of downstream compatibility because the destination pack and its synchronization contract remain unverified.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@royklo
royklo merged commit ab9eb4b into main Oct 26, 2026
3 checks passed
@royklo
royklo deleted the feat/intune-anomaly-core branch October 26, 2026 05:36
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