How micke-k/intunemanagement works
Project type and purpose
• This is a Windows desktop application built in PowerShell with a WPF front-end.
• Purpose: Provide a UI (and optional CLI/silent mode) to manage Microsoft Intune and Azure objects via MSAL-authenticated calls to Microsoft Graph and Azure Management APIs. Features include Export/Import of JSON objects, Compare, Bulk Copy, Documentation, ADMX import, etc.
Top-level components
a. UI Layer (WPF)
• XAML Views: located under /Xaml and /Themes
• Code-behind entry script: Start-IntuneManagement.ps1 (and CMD wrappers)
b. Core Framework Modules
• Core.psm1: UI management, settings, logging support
• CloudAPIPowerShellManagement.psm1: foundational abstractions for Graph/Azure calls, token cache helpers (CS/TokenCacheHelperEx.cs, HttpFactoryWithProxy.cs)
c. Extension Modules (features plug-ins)
• Modules under /Extensions (e.g., Compare.psm1, Import.psm1, MSGraph.psm1, IntuneTools.psm1, …)
d. Authentication library
• MSAL DLL: Microsoft.Identity.Client.dll (packaged copy + optional Az/MSAL.PS fallback)
e. Services Layer
• Authentication Service (wraps MSAL)
• Graph API Service (calls Microsoft Graph REST endpoints)
• Azure Management API Service (undocumented endpoints)
f. Data & Configuration
• File-system: exported JSON object folders, ADMX/ADML files, bulk-job JSON settings
• Registry or JSON settings file %LOCALAPPDATA%\CloudAPIPowerShellManagement\Settings.json
• Application logs (CMTrace format)
g. External endpoints
• Azure AD (token issuance)
• Microsoft Graph API (beta endpoints)
• Azure Management API
Relationships and data flows
• UI Layer → Core Framework: calls cmdlets/functions for generic UI, settings, logging
• Core Framework → Extension Modules: dispatch user actions (Export, Import, Compare, etc.)
• Extension Modules → Services Layer:
• Auth Service retrieves token via MSAL
• Graph Service / AzureMgmt Service issues REST calls
• Services Layer ↔ External Endpoints over HTTPS
• Extension Modules → File System: read/write JSON export files, read ADMX/ADML, read/write settings JSON, registry I/O
• CLI Entrypoint (Start-*.ps1 with –Silent) → Core/Extensions (headless execution)
Architectural patterns & design principles
• Modular plug-in architecture: core modules + multiple independent extension modules
• MVVM‐inspired separation: XAML views separated from PS “view models” (cmdlet logic)
• Layered design: UI → Orchestration (Core) → Feature Modules → Services → External APIs
• Configurable Data Store: registry vs. JSON file for settings, file-system for exported data
• Optional Headless mode: pipeline friendly