Script Limitations to Migrating +400K Users from custom CIAM to Microsoft Entra External ID

Jinki Lee 100 Reputation points
2026-06-08T14:23:36.2466667+00:00

We are attemping to migrate our customer data from our custom CIAM to Microsoft Entra External ID. Our backend migration script (400K users) is hitting throttling limits. For example, 3,500 customers migrated in 3.5 minutes before the process paused and asked to wait 150 seconds.

Is it possible to increase this limit or optimize the script during migration testing and the actual migration?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-08T14:23:59.6+00:00

    Microsoft Entra External ID and Microsoft Graph enforce throttling limits that can't be disabled, but migration can be optimized within those limits.

    Key points from the documented limits and guidance:

    1. Understand the limits
      • External tenants have request limits such as:
        • Maximum requests per IP per external tenant: 20 per second
        • Maximum requests per external tenant: 200 per second
        • Maximum requests per external trial tenant: 20 per second
      • Administrative CRUD operations (like bulk user creation) via Microsoft Graph are subject to Graph throttling limits and Graph throttling guidance.
      • Total objects per tenant is 300,000 by default; to increase this, Microsoft Support must be contacted.
    2. Optimize the migration script
      • Follow the migration guidance for Stage 1: Migrate user data:
        • Read users from the legacy CIAM.
        • Create users in External ID via Microsoft Graph.
        • If plaintext passwords are unavailable, set random passwords and handle password migration later.
      • For large one-time directory operations like your 400K-user migration:
        • Use Microsoft Graph batch operations to increase throughput.
        • Use up to six application registrations to perform Graph operations in parallel. This can increase throughput but also risks hitting tenant-level limits, so must be used carefully.
      • When throttling occurs, follow the Graph throttling guidance (respect Retry-After, backoff, and pacing logic in the script).
    3. Design for throttling and request limits
      • Ensure the script:
        • Caps the per-second request rate to stay under the documented limits (per IP and per tenant).
        • Implements exponential backoff and honors Graph throttling responses.
        • Uses batching to reduce the number of HTTP calls (for example, multiple user creates per batch request).
      • For very large migrations, consider splitting the migration into phases and running during off-peak times to reduce contention with other workloads.
    4. When to contact Microsoft Support
      • If the 300,000 object per tenant limit is a blocker, Microsoft Support can be contacted to request an increase.
      • For Graph resource types with stricter throttling limits, Microsoft notes that mitigations can be planned case-by-case via a support ticket.

    There is no supported way to turn off throttling, but by using Graph batch operations, multiple app registrations (up to six), proper backoff, and respecting the documented per-tenant and per-IP limits, the migration script can be optimized to move 400K users reliably.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.