Add Conditional Access Policy sync and helpers#32
Merged
TecharyJames merged 2 commits intoJames-Tarran:masterfrom Mar 17, 2026
Merged
Add Conditional Access Policy sync and helpers#32TecharyJames merged 2 commits intoJames-Tarran:masterfrom
TecharyJames merged 2 commits intoJames-Tarran:masterfrom
Conversation
Introduce full support for syncing Microsoft 365 Conditional Access Policies (CAPs) into ITGlue and refactor ITGlue sync logic for more efficient updates. Changes: - Added private helpers: Add-ITGlueFlexibleAssetFields (batch-add flexible asset fields), Format-ITGlueCAPValue (format newline lists), and Sync-ITGlueConditionalAccessPolicies (create/update/delete CAP flexible assets, HTML details, hash-based change detection, caching). - Extended Get-ITGlueFieldMapping to include ConditionalAccessPolicies mapping key. - Heavily refactored Invoke-ITGlueExtensionSync to: - Use a centralized asset cache table and hash-based detection to skip unchanged assets (users, devices, CAPs). Timestamps are excluded from hashes so only real content changes trigger updates. - Batch field additions via Add-ITGlueFlexibleAssetFields and auto-create a Conditional Access Policy flexible asset type if missing. - Support create/update/delete flows for users, devices, configurations and CAP flexible assets, with cache maintenance and improved logging/metrics (updated vs unchanged counts). - Improve HTML quick-notes replacement logic for organization overview. Why: reduce unnecessary API calls and updates, add CAP syncing capability, and simplify management of flexible asset fields and change detection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce full support for syncing Microsoft 365 Conditional Access Policies (CAPs) into ITGlue and refactor ITGlue sync logic for more efficient updates.
Changes:
Why: reduce unnecessary API calls and updates, add CAP syncing capability, and simplify management of flexible asset fields and change detection.