- Add Deploy-IntuneBaseline.ps1 for YAML-driven policy + assignment deployment - Add ConvertTo-IntuneBaseline.ps1 to convert export folders to baseline manifests - Add example OpenIntuneBaseline YAML in Baselines/ - Supports mutations, group auto-creation, idempotency, and WhatIf mode
4.5 KiB
4.5 KiB
Agent Operations Log
Session: 2026-04-13T13:31:37+02:00
Task
Update Initialize-IntuneAuth.ps1 to ensure the Entra app registration is granted all Microsoft Graph permissions required by the expanded macOS Intune Toolkit, and log all operations.
Operations performed
-
ReadFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 - Line offset:
140, Lines:60 - Purpose: Inspect the existing roles array and app creation logic.
- Path:
-
StrReplaceFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 - Change: Replaced the inline
$rolesarray + app creation block with a unified$requiredRoleslist and added logic to patch missing permissions into an existing app registration viaUpdate-MgApplication. - Impact: New apps get the full permission set; existing apps are updated if roles are missing.
- Path:
-
Grep
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 - Pattern:
New-MgServicePrincipalAppRoleAssignment - Purpose: Verify the downstream admin-consent loop would pick up updated roles.
- Path:
-
ReadFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 - Line offset:
220, Lines:50 - Purpose: Inspect the consent-granting region around
New-MgServicePrincipalAppRoleAssignment.
- Path:
-
Grep
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 - Pattern:
\$roles - Purpose: Confirm no stale
$rolesreferences remained after the refactor.
- Path:
-
Shell
- Command:
pwsh -Command "$ErrorActionPreference='Stop'; Get-Command /Users/avedelphina/Local/IntuneManagement/Scripts/Initialize-IntuneAuth.ps1 | Out-Null; Write-Host 'Syntax OK'" - Result: Syntax OK (PowerShell parsed the script without errors).
- Command:
-
Shell
- Command:
cd /Users/avedelphina/Local/IntuneManagement && git diff -- Scripts/Initialize-IntuneAuth.ps1 - Result: No diff output (file is untracked in git).
- Command:
-
Shell
- Command:
cd /Users/avedelphina/Local/IntuneManagement && git status --short - Result: Listed modified and untracked files, confirming
Scripts/Initialize-IntuneAuth.ps1is??(untracked).
- Command:
-
WriteFile
- Path:
/Users/avedelphina/Local/IntuneManagement/CHANGELOG_macOS_IntuneToolkit.md - Content: High-level changelog of the permissions update and prior context.
- Path:
-
WriteFile
- Path:
/Users/avedelphina/Local/IntuneManagement/OPERATIONS_LOG.md - Content: This file.
- Path:
Files modified in this session
Scripts/Initialize-IntuneAuth.ps1
Files created in this session
CHANGELOG_macOS_IntuneToolkit.mdOPERATIONS_LOG.md
Session: 2026-04-13 (continuation)
Task
Build a declarative Intune baseline deployment system (YAML manifest + deployer script + converter helper).
Operations performed
-
ReadFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Bulk-AssignmentManager.ps1 - Purpose: Studied auth bootstrap pattern,
$assignableTypesregistry, and assignment payload format.
- Path:
-
ReadFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Extensions/MSGraph.psm1 - Purpose: Verified
Invoke-GraphRequestparameter names (ContentaliasBody,HttpMethodaliasMethod).
- Path:
-
WriteFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Baselines/OpenIntuneBaseline.example.yaml - Content: Example baseline manifest with groups, mutations, and policy assignments.
- Path:
-
WriteFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/Deploy-IntuneBaseline.ps1 - Content: Main deployer script (~550 lines) with YAML parsing, group creation, policy import/update, mutation, idempotency, and assignment deployment.
- Path:
-
WriteFile
- Path:
/Users/avedelphina/Local/IntuneManagement/Scripts/ConvertTo-IntuneBaseline.ps1 - Content: Helper script that scans an export folder and emits a baseline YAML skeleton.
- Path:
-
Shell
- Commands: Syntax validation (
Get-Command) on both new scripts. - Result: Both scripts parsed successfully.
- Commands: Syntax validation (
-
WriteFile (append)
- Path:
/Users/avedelphina/Local/IntuneManagement/CHANGELOG_macOS_IntuneToolkit.md - Added changelog entry for the baseline deployer feature.
- Path:
-
WriteFile (append)
- Path:
/Users/avedelphina/Local/IntuneManagement/OPERATIONS_LOG.md - Added this very entry.
- Path:
Files created in this session
Baselines/OpenIntuneBaseline.example.yamlScripts/Deploy-IntuneBaseline.ps1Scripts/ConvertTo-IntuneBaseline.ps1