Skip to content

Fix: Update DeviceManagementConfiguration scope and add .gitignore#20

Open
rich-rltech wants to merge 1 commit into
petripaavola:mainfrom
rich-rltech:fix-encrypted-oma-settings-scope
Open

Fix: Update DeviceManagementConfiguration scope and add .gitignore#20
rich-rltech wants to merge 1 commit into
petripaavola:mainfrom
rich-rltech:fix-encrypted-oma-settings-scope

Conversation

@rich-rltech
Copy link
Copy Markdown

Issue

Script fails with 403 Forbidden when fetching encrypted OMA-URI settings

Root Cause

Microsoft's getOmaSettingPlainTextValue endpoint requires DeviceManagementConfiguration.ReadWrite.All even for read-only operations, but the script only requested DeviceManagementConfiguration.Read.All.

Changes

  • Updated Connect-MgGraph scope from DeviceManagementConfiguration.Read.All to DeviceManagementConfiguration.ReadWrite.All
  • Added .gitignore to exclude /cache and /reports directories from version control

Testing

  • Tested on Windows 10 with delegated auth (Connect-MgGraph)
  • Script now successfully decrypts OMA-URI secrets and generates extended reports
  • All policy information retrieval working without 403 errors

- Change scope from DeviceManagementConfiguration.Read.All to ReadWrite.All
- This fixes 403 Forbidden errors when fetching encrypted OMA-URI settings
- Microsoft's getOmaSettingPlainTextValue endpoint requires ReadWrite.All even for read-only operations
- Add .gitignore to exclude /cache and /reports directories from version control
@rich-rltech
Copy link
Copy Markdown
Author

Bump for review @petripaavola

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