Azure Managed Application Fails with KeyVaultParameterReferenceNotInTheSameTenant When Publisher Management Access Is Disabled

Tadas Šukys 45 Reputation points
2026-10-20T16:11:06.5766667+00:00

We have an Azure Managed Application that deploys an Azure Container App. The container image is stored in an Azure Container Registry (ACR) located in the publisher's tenant.

To authenticate to the ACR, the deployment uses ACR username and password parameters. These credentials are retrieved from an Azure Key Vault during deployment, as described in the documentation here https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/key-vault-access

The Azure Key Vault that stores the ACR credentials is also hosted in the publisher's tenant.

This configuration works as expected when the Azure Managed Application is published as an Azure Marketplace offer and the Managed Application plan is configured with "Publisher Management" > "Enable management access", see https://learn.microsoft.com/en-us/partner-center/marketplace-offers/azure-app-managed#publisher-management-access

User's image

In this scenario, the managed application is deployed into the customer's tenant, the ACR credentials are successfully retrieved from the publisher's Key Vault, stored as secrets in the Azure Container App, and the container image is pulled from the ACR without issues.

However, when "Publisher Management" is changed to "Disable management access", deployment of the managed application in the customer's tenant fails with the following error:

{
	"status": "Failed",
	"error": {
		"code": "ResourceOperationFailure",
		"message": "The resource operation completed with terminal provisioning state 'Failed'.",
		"details": [
			{
				"code": "ApplicationDeploymentFailed",
				"target": "/subscriptions/<consumerSubId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Resources/deployments/kve0076restrictedsametenant",
				"message": "The operation to create application failed. Please check operations of deployment '<app name>' under resource group '/subscriptions/<consumerSubId>/resourceGroups/<resourceGroupName>'. Error message: 'At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.'",
				"details": [
					{
						"code": "MultipleErrorsOccurred",
						"message": "Multiple error occurred: BadRequest,BadRequest. Please see details.",
						"details": [
							{
								"code": "KeyVaultParameterReferenceNotInTheSameTenant",
								"message": "The specified KeyVault '/subscriptions/<publisherSubId>/resourceGroups/<publisherGroupName>/providers/Microsoft.KeyVault/vaults/<keyvault>' is not in current tenant '<consumerTenant>' for subscription '<consumerSubId>'. Please see https://aka.ms/arm-keyvault for usage details."
							},
							{
								"code": "KeyVaultParameterReferenceNotInTheSameTenant",
								"message": "The specified KeyVault '/subscriptions/<publisherSubId>/resourceGroups/<publisherGroupName>/providers/Microsoft.KeyVault/vaults/<keyvault>' is not in current tenant '<consumerTenant>' for subscription '<consumerSubId>'. Please see https://aka.ms/arm-keyvault for usage details."
							}
						]
					}
				]
			}
		]
	}
}

Here are questions:

  • Why does disabling publisher management access cause the KeyVaultParameterReferenceNotInTheSameTenant error?
  • Is access to a Key Vault in the publisher's tenant prohibited when publisher management access is disabled?
  • What is the recommended approach for providing ACR credentials in this scenario?
  • Is there an alternative authentication method for allowing the Azure Container App to pull images from the publisher's ACR when the managed application is deployed in a customer's tenant and publisher management access is disabled?
Azure Managed Applications
Azure Managed Applications

An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-10-20T16:12:15.09+00:00

    Disabling publisher management access makes the publisher-tenant Key Vault reference unsupported; remove that reference and use either customer-supplied secure parameters or a cross-tenant ACR service principal, with a customer-local ACR plus managed identity as the strongest credential-free design.

    Why the deployment changes behavior

    Microsoft documents Key Vault credential retrieval for Managed Applications only when management access is enabled.^1^ The Key Vault integration also relies on the Appliance Resource Provider service principal being granted access to the vault.^2^

    When management access is disabled:

    • The publisher has no access to the deployed managed application or managed resource group in the customer tenant.
    • The deployment executes in the customer subscription and tenant.
    • The publisher Key Vault reference crosses that tenant boundary, producing KeyVaultParameterReferenceNotInTheSameTenant.

    “No publisher management access” is a supported permission model, but it intentionally removes publisher access; it is not merely a UI setting controlling post-deployment maintenance.^3^

    Therefore, granting more Key Vault permissions, enabling template deployment, or changing the vault firewall does not resolve this particular error. Those settings are relevant only after the deployment model supports the Key Vault reference.

    Option 1: Customer-local ACR and managed identity

    For the cleanest separation, make the image available in an ACR belonging to the customer tenant, then:

    1. Deploy a user-assigned managed identity with the managed application.
    2. Assign it AcrPull on the customer’s ACR.
    3. Attach the identity to the Container App.
    4. Configure the registry entry with the identity resource ID instead of username and passwordSecretRef.

    Container Apps supports both user-assigned and system-assigned identities for ACR pulls and recommends user-assigned identity when possible.^4^

    Conceptually, the Container App registry configuration is:

    {
      "identity": {
        "type": "UserAssigned",
        "userAssignedIdentities": {
          "<identity-resource-id>": {}
        }
      },
      "properties": {
        "configuration": {
          "registries": [{
            "server": "<customer-registry>.azurecr.io",
            "identity": "<identity-resource-id>"
          }]
        }
      }
    }
    

    Do not specify a registry username or password when using managed identity. The identity must have AcrPull on the registry.^5^

    Images can be imported from an ACR in another tenant by supplying pull credentials during the import. Cross-tenant import does not work when public access is disabled on the source registry.^6^

    Option 2: Cross-tenant service principal

    If the Container App must pull directly from the publisher ACR:

    1. Create a multitenant application/service principal for the workload.
    2. Provision its service principal in the publisher tenant.
    3. On the publisher ACR, assign:
      • AcrPull for a non-ABAC registry, or
      • Container Registry Repository Reader for an ABAC-enabled registry.
    4. Configure Container Apps registry authentication using:
      • Username: application/client ID
      • Password: client secret
    5. Pass those values as secure customer inputs or retrieve them through a secret mechanism located in the customer tenant. Do not embed them in the Marketplace package.

    ACR explicitly supports a service principal for cross-tenant image-pull scenarios.^7^ Container Apps accepts registry credentials through a secret referenced by passwordSecretRef.^5^

    A repository-scoped ACR token can provide narrower repository access than the registry-wide admin account, but it remains a username/password credential that must be delivered and rotated securely. Do not use or hardcode the ACR administrator credentials; hardcoded usernames, passwords, keys, and SAS URIs are prohibited in Managed Application packages.^1^

    Managed identity directly against the publisher ACR

    Container Apps documents managed-identity image pulls where the identity is assigned AcrPull on the registry, but the supplied documentation does not establish a supported cross-tenant Container Apps managed-identity flow. A managed identity created with the Container App belongs to the customer tenant, while the publisher ACR belongs to another tenant.

    Use the documented cross-tenant service-principal pattern instead, or copy the image into a customer-tenant ACR and use managed identity locally. Do not infer cross-tenant support from the fact that managed identity works when both resources share a tenant.


    References

    1. Restrictions on hardcoded credentials
    2. Access Key Vault secret when deploying Azure Managed Applications
    3. Azure Managed Applications overview
    4. Azure Container Apps image pull with managed identity (portal)
    5. Containers in Azure Container Apps
    6. Import container images to a container registry
    7. Azure Container Registry authentication with service principals
    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.