Create and assign an Intune iOS app protection policy via Graph API

domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Acquire a token with DeviceManagementApps.ReadWrite.All permission via client credentials or delegated flow
  2. POST to https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections with a JSON body specifying displayName, periodOfflineBeforeWipeIsEnforced, pinRequired, allowedDataStorageLocations, and other MAM settings
  3. Note the id returned in the 201 response; use it to assign the policy
  4. POST to https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections/{policyId}/assign with a body containing target group IDs in the assignments array
  5. Verify assignment by calling GET https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections/{policyId}/assignments
  6. Test enforcement by enrolling a test device without MDM enrollment and launching an assigned app; policy should apply via Company Portal MAM registration

Known gotchas

Related routes

Automate Intune device compliance policy assignment via Microsoft Graph API
learn.microsoft.com · 6 steps · unrated
List all Intune device compliance policies via Microsoft Graph API
learn.microsoft.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans