Azure App Service Identity Limits: How Many User-Assigned Managed Identities Can Be Assigned to single web app?

Bansal Patel 0 Reputation points
2025-06-18T14:16:59.4166667+00:00

I am observing inconsistent behavior when assigning user-assigned managed identities to different Azure Web Apps. Specifically, one of my web apps allows up to 295 identities, while another permits up to 325.

According to Azure documentation, there is no clearly stated hard limit or variability explained for this resource, and I would like to understand:

Is there a defined or documented limit for the number of user-assigned managed identities per App Service?

If the limit varies, what factors influence it? (e.g., App Service Plan tier, region, resource availability, etc.)

Is there a recommended approach to programmatically determine the current or remaining capacity for assigned identities?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,932 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargavi Naragani 5,270 Reputation points Microsoft External Staff Moderator
    2025-06-18T15:49:17.42+00:00

    Hi @Bansal Patel,

    Currently, Azure does not publicly define a fixed limit for the number of User-Assigned Managed Identities (UAMIs) that can be attached to a single App Service. However, in practice, users have observed a typical functional limit between 250 and 400 identities per web app.

    1. Microsoft documentation does not specify an exact maximum. The actual number may vary depending on platform-level constraints like:
      • Region and infrastructure backend
      • App Service Plan size
      • ARM schema limitations (e.g., JSON payload size)
    2. As you've noticed, one app allowed 295 UAMIs, and another 325, this is expected and not an error. Variability is common and influenced by internal platform constraints.
    3. Monitor identity assignments programmatically using CLI or REST: https://learn.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az-resource-show
         az resource show \
           --resource-type "Microsoft.Web/sites" \
           --name <your-app-name> \
           --resource-group <your-resource-group> \
           --query "identity.userAssignedIdentities"
      
      1. Design apps to use shared UAMIs where possible.
      2. If approaching 300+, consider scaling across multiple apps or rotate UAMIs dynamically.
    4. If require assigning more than 300 UAMIs to a single app, the best path is to open a Microsoft Support Request to check your subscription’s specific platform limits in your target region. And use modular architecture to avoid single-resource bottlenecks.

    Reference:
    Azure Managed Identities Overview
    Azure App Service limits (This page does not list a limit on identities but is useful for related resource constraints)
    User-assigned managed identity limits (refer to this for edge cases and quota caveats)

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.

    0 comments No comments

Your answer

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