- Unified required Microsoft Graph app roles in Initialize-IntuneAuth.ps1 - Added permission patching for existing app registrations - Logs the change and operations for audit
2.7 KiB
2.7 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