Skip to content

Add Conditional Access Policy sync and helpers#32

Merged
TecharyJames merged 2 commits intoJames-Tarran:masterfrom
TecharyJames:feature/itglue
Mar 17, 2026
Merged

Add Conditional Access Policy sync and helpers#32
TecharyJames merged 2 commits intoJames-Tarran:masterfrom
TecharyJames:feature/itglue

Conversation

@TecharyJames
Copy link
Copy Markdown
Collaborator

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.

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.
@TecharyJames TecharyJames merged commit bf96ab4 into James-Tarran:master Mar 17, 2026
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.

1 participant