Azure App Service Key Vault Reference: User Assigned Managed Identity (UMI) is Consistently Ignored - Platform Bug?

Konstantinos Anagnostou 45 Reputation points
2025-06-06T21:54:02.71+00:00

When using Azure App Service with Key Vault references in App Settings, the platform always attempts to resolve secrets using the System Assigned Managed Identity (SMI), even when I explicitly assign only a User Assigned Managed Identity (UMI) and set keyVaultReferenceIdentity at the resource root. This has been tested in multiple tenants and subscriptions with clean deployments.

What I have tried:

  • Created a User Assigned Managed Identity (UMI), assigned it to the App Service.
  • Disabled SMI on the App Service (only UMI present).
  • Set keyVaultReferenceIdentity property to the UMI resource ID (both in Bicep and confirmed via az webapp show).
  • Assigned Key Vault Secrets User role to the UMI on the Key Vault.
  • Verified networking, private endpoints, and DNS resolution are correct.
  • Tested on multiple tenants, subscriptions, and resource groups.

Result:

Key Vault reference in App Settings always tries to use SMI. If SMI is not present, the reference fails because it uses System assigned managed identity no matter what.

References:

Docs followed: https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli#access-vaults-with-a-user-assigned-identity

My configuration (example):

keyVaultReferenceIdentity property is set at the App Service root:

   "keyVaultReferenceIdentity": "/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi-example"

App Service Identity block:


  "identity": {
      "type": "UserAssigned",
      "userAssignedIdentities": { 
"/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi-example": {
    ...
   }
  }
}
  • Azure always tries to use SMI, and never UMI, regardless of what is set.

My question:

Is this a known bug, or is there any working configuration to force Azure App Service Key Vault References to use a User Assigned Managed Identity only?

Has anyone found a solution?

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

Answer accepted by question author
Shree Hima Bindu Maganti 7,365 Reputation points Microsoft External Staff Moderator
2025-06-09T17:21:14.9466667+00:00

Hi @Konstantinos Anagnostou
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

**Issue:Azure App Service Key Vault Reference: User Assigned Managed Identity (UMI) is Consistently Ignored - Platform Bug?

Solution:**
Update:

This is not a platform bug — but the Azure Portal and Key Vault reference UI are extremely misleading in this scenario.

Even when using User Assigned Managed Identity (UMI) correctly with keyVaultReferenceIdentity, the App Settings UI always displays "System Assigned Managed Identity" as the source of secret resolution.

After enabling diagnostic logs and inspecting the audit trail, I confirmed:

  • The appid used during the Key Vault access was the correct UMI.
  • The access was properly authorized via RBAC for the UMI.
  • The 403 Forbidden error was due to incorrect DNS resolution
    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. Konstantinos Anagnostou 45 Reputation points
    2025-06-06T23:48:12.39+00:00

    Update:

    This is not a platform bug — but the Azure Portal and Key Vault reference UI are extremely misleading in this scenario.

    Even when using User Assigned Managed Identity (UMI) correctly with keyVaultReferenceIdentity, the App Settings UI always displays "System Assigned Managed Identity" as the source of secret resolution.

    After enabling diagnostic logs and inspecting the audit trail, I confirmed:

    • The appid used during the Key Vault access was the correct UMI.
    • The access was properly authorized via RBAC for the UMI.
    • The 403 Forbidden error was due to incorrect DNS resolution

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

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.