You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Overview of the delegatedManagedIdentityResourceId property
3
+
description: Describes the concept of the delegatedManagedIdentityResourceId property for Azure Managed Applications.
4
+
ms.topic: overview
5
+
ms.date: 02/10/2025
6
+
---
7
+
8
+
# What is the delegatedManagedIdentityResourceId property?
9
+
10
+
In Azure, the `delegatedManagedIdentityResourceId` property is used to properly assign roles to managed identities across different tenants. This assignment is useful when dealing with managed applications published in Azure Marketplace where the publisher and the customer exist in separate tenants.
11
+
12
+
## Why do we need it?
13
+
14
+
When a customer deploys a managed application from the marketplace, the publisher is responsible for managing resources within the managed resource group (MRG). However, any role assignments performed as part of the deployment template occur in the publisher's tenant. These assignments create a challenge when the managed identity is created in the customer's tenant, because role assignment fails if it tries to locate the identity in the wrong tenant.
15
+
16
+
The `delegatedManagedIdentityResourceId` property resolves this issue by explicitly specifying where the managed identity exists, ensuring that the role assignment process can correctly locate and assign permissions.
17
+
18
+
## How it works
19
+
20
+
### Managed identity creation
21
+
22
+
When you deploy a managed application, the managed identity is created in the customer's tenant.
23
+
24
+
### Role assignment
25
+
26
+
Role assignment deployment occurs under the publisher's tenant, role assignments naturally look for identities within that tenant.
27
+
28
+
### Using delegatedManagedIdentityResourceId
29
+
30
+
By specifying the correct resource ID:
31
+
32
+
-**For System Assigned Identities**: Use the resource ID of the resource that holds the identity. For example, a Function App or Logic App.
33
+
-**For User Assigned Identities**: Use the resource ID of the identity itself.
34
+
35
+
## How to apply delegatedManagedIdentityResourceId
36
+
37
+
To set up role assignment correctly, add the `delegatedManagedIdentityResourceId` property in the role assignment section of your Azure Resource Manager template (ARM template). Example:
### Role assignment failure due to missing identity
54
+
55
+
- Ensure that the correct resource ID is provided in `delegatedManagedIdentityResourceId`.
56
+
- Verify that the managed identity exists in the customer's tenant.
57
+
58
+
### Deny assignment prevents access
59
+
60
+
- The deny assignment prevents customers access to the MRG.
61
+
- Ensure the publisher's identity managing the MRG is correctly referenced in the customer's tenant.
62
+
63
+
### Misconfigured deployment context
64
+
65
+
- AMA deployments with published managed apps and publisher access enabled occur in the publisher's tenant.
66
+
- Ensure `delegatedManagedIdentityResourceId` is properly set to reference the customer's tenant identity.
67
+
68
+
### Role assignment PUT request only supported in a cross tenant
69
+
70
+
A role assignment PUT request with the `delegatedManagedIdentityResourceId` is only supported in cross-tenant scenarios and doesn't support deployments within the same tenant. To use it within the same tenant during testing, add a parameter to include the property as follows:
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/managed-applications/publish-managed-identity.md
+34-32Lines changed: 34 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Managed app with managed identity
3
3
description: Configure an Azure Managed Application with managed identity for linking to existing resources, managing Azure resources, and providing operational identity for Activity Log.
4
4
ms.topic: conceptual
5
-
ms.date: 06/24/2024
5
+
ms.date: 02/10/2025
6
6
ms.custom: subject-rbac-steps
7
7
---
8
8
@@ -361,7 +361,7 @@ The response contains an array of tokens under the `value` property:
361
361
362
362
## Create a managed identity and role assignment for managed applications
363
363
364
-
This section describes how to create a managed identity and assign a role as part of a managed application using publisher access mode.
364
+
This section describes how to create a managed identity and assign a role as part of a managed application using publisher access mode.
365
365
366
366
1. Create a managed identity using an Azure Resource Manager template.
367
367
@@ -385,44 +385,46 @@ This section describes how to create a managed identity and assign a role as par
385
385
Since the managed identity is not in the home tenant of the target scope, you must apply a delay between creating the managed identity and assigning the role to allow the managed identity to propagate between tenants. Without this delay, Azure Resource Manager might not recognize this identity when used in the template and fail within a future deployment script.
386
386
387
387
```json
388
-
{
389
-
"type": "Microsoft.Resources/deploymentScripts",
390
-
"apiVersion": "2020-10-01",
391
-
"name": "sleepScript",
392
-
"location": "[resourceGroup().location]",
393
-
"properties": {
394
-
"azPowerShellVersion": "2.0",
395
-
"scriptContent": "Start-Sleep -Seconds 30",
396
-
"timeout": "PT1H",
397
-
"cleanupPreference": "OnSuccess",
398
-
"retentionInterval": "P1D"
399
-
},
400
-
"dependsOn": [
401
-
"myManagedIdentity"
402
-
]
388
+
{
389
+
"type": "Microsoft.Resources/deploymentScripts",
390
+
"apiVersion": "2020-10-01",
391
+
"name": "sleepScript",
392
+
"location": "[resourceGroup().location]",
393
+
"properties": {
394
+
"azPowerShellVersion": "2.0",
395
+
"scriptContent": "Start-Sleep -Seconds 30",
396
+
"timeout": "PT1H",
397
+
"cleanupPreference": "OnSuccess",
398
+
"retentionInterval": "P1D"
399
+
},
400
+
"dependsOn": [
401
+
"myManagedIdentity"
402
+
]
403
403
}
404
404
```
405
405
406
406
1. Assign the Contributor role to the managed identity at the scope of the managed resource group.
The `delegatedManagedIdentityResourceId` property is used to properly assign roles to managed identities across different tenants. This is particularly useful when dealing with managed applications published in the Azure Marketplace, where the publisher and the customer exist in separate tenants. Learn more about [delegatedManagedIdentityResourceId](concepts-delegated-managed-identity-resource-id.md).
0 commit comments