Hi Nina Polshakova,
Thank you for reaching out — we completely understand how frustrating intermittent errors can be, especially when the same code works sometimes and fails other times. The InsufficientServicePlans error you're seeing from the Graph DLP processContent API is tied to licensing and authorization, and the "random" behavior most likely has a logical explanation. Let us walk you through what to check.
- Confirm Your Authentication Flow (Delegated vs. App-Only)
The processContent API behaves differently depending on how you authenticate. If you're using a delegated flow, you should call /me/dataSecurityAndGovernance/processContent with a signed-in user context and the Content.Process.User (least privileged) or Content.Process.All delegated permission. If you're using an app-only flow, you cannot call the /me endpoint — you must use /users/{userId}/dataSecurityAndGovernance/processContent and grant the app the Content.Process.All application permission. Calling /me with an app-only token will fail because the /me endpoint requires a signed-in user context, and the service principal itself is not licensed for DLP — this will produce the InsufficientServicePlans error.
- Verify the User Has an E5/A5/G5 or Equivalent Purview DLP License
The processContent API evaluates the caller's Purview/DLP service plan. The user (in delegated scenarios) or the target user (in app-only scenarios) must have one of the following licenses: Microsoft 365 E5/A5/G5, E5/A5/G5/F5 Compliance or F5 Security & Compliance add-on, or E5/A5/G5/F5 Information Protection & Governance add-on. You can decode your JWT token and inspect the scp (delegated) or roles (app-only) claim to confirm the correct permissions are present.
- Enable Pay-As-You-Go Billing — This Is a Critical Prerequisite
This is easy to overlook but very important. Microsoft's official integration guide states that managing AI interactions with Microsoft Purview requires you to enable pay-as-you-go billing in your organization. If pay-as-you-go billing is not enabled, the processContent API may intermittently fail — this could very well be the root cause of the "random" behavior you're experiencing. Please verify this is enabled in the Microsoft Purview portal → Settings → Billing.
- Check Your Token Cache and Environment
If your application's token cache sometimes returns tokens for a licensed user and sometimes for an unlicensed user (or switches between delegated and app-only tokens), that would perfectly explain the intermittent failures. Please make sure your token acquisition logic is consistent, you're not mixing user contexts across requests, and the token cache is not stale or serving tokens from different identities.
- Consider Using the v1.0 Stable Endpoint
We noticed you're using the beta endpoint. The processContent API is now also available in v1.0 (graph.microsoft.com/v1.0/me/dataSecurityAndGovernance/processContent). For production workloads, we recommend switching to the v1.0 endpoint for better stability and support.
- Recent Service-Side Incidents
It's also worth noting that there were transient service availability incidents on the ProcessContent API around early May 2026, where the API availability briefly dropped below SLA. These were self-mitigated on Microsoft's end. So some of the intermittent failures you experienced may not have been entirely on your side.
To help us narrow things down further, could you please clarify:
- Are you always using the same authentication flow (delegated vs. app-only)?
- Which endpoint are you calling —
/me/... or /users/{id}/...?
- Can you share the decoded JWT (with PII removed) so we can verify the
scp or roles claim?
- Does the user(s) you're testing with definitely have an E5/A5/G5 or equivalent Purview DLP license assigned?
- Is pay-as-you-go billing enabled in your Purview portal?
The InsufficientServicePlans error is almost always caused by one of three things: a missing or mismatched DLP-capable license on the calling user, an app-only token accidentally hitting the /me endpoint, or pay-as-you-go billing not being enabled in your tenant. We strongly recommend starting by verifying your authentication flow and confirming the correct permission name (Content.Process.All or Content.Process.User), then checking that pay-as-you-go billing is active, and finally switching to the stable v1.0 endpoint for production use. Once these items are addressed, the intermittent failures should stop. If the issue persists after these checks, please share the decoded JWT and we'll investigate further.
Microsoft Reference Links:
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.