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
Copy file name to clipboardExpand all lines: articles/virtual-network-manager/deploy-cross-tenant-ip-address-management.md
+48-53Lines changed: 48 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,58 +12,36 @@ ms.date: 05/05/2025
12
12
13
13
In this article, you learn how to deploy a virtual network in a managed tenant (Tenant B) that draws from an Azure Virtual Network Manager (AVNM) IP Address Management (IPAM) pool maintained in a management tenant (Tenant A). This process demonstrates how a parent organization can centrally manage IP address allocations across multiple child organizations that exist in different Azure tenants.
14
14
15
+
In this cross-tenant deployment, the management tenant (Tenant A) is the parent organization that manages IP address allocations for multiple child organizations (managed tenants) from a central network manager. The managed tenant (Tenant B) is a child organization that consumes IP address allocations from the management tenant. The managed tenant hosts the virtual networks that consume IP addresses from Tenant A's IPAM pools.
16
+
15
17
## Prerequisites
16
18
19
+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
20
+
-- The [latest Azure CLI](/cli/azure/install-azure-cli) version installed.
17
21
- Two Azure tenants: a management tenant (Tenant A) and a managed tenant (Tenant B)
18
22
- Management tenant (Tenant A) must have:
19
23
- An Azure Virtual Network Manager instance If you don't have a network manager instance, see [Create a network manager instance](create-virtual-network-manager-portal.md).
20
-
- An IPAM pool created in the network manager instance. If you don't have an IPAM pool, see [Create an IPAM pool](how-to-manage-ip-addresses-network-manager.md#create-an-ip-address-pool).
24
+
- An IPAM pool created in the network manager instance. If you don't have an IPAM pool, see [Create an IPAM pool](how-to-manage-ip-addresses-network-manager.md#create-an-ip-address-pool).
21
25
- Network manager configured with cross-tenant connection to Tenant B. For more information, see [Add remote tenant scope in Azure Virtual Network Manager](how-to-configure-cross-tenant-portal.md).
22
26
- *IPAM Pool User* role assigned to your user or service principal
23
27
- Managed tenant (Tenant B) must have:
24
28
-*Network Contributor* role assigned at the subscription or virtual network level
25
-
- Access to create or modify service principals (for programmatic approach)
26
-
27
-
## Understanding cross-tenant IPAM architecture
28
-
29
-
Cross-tenant IPAM deployment has two primary approaches:
30
-
31
-
-**Azure Portal flow**: Interactive process for manually associating resources
32
-
-**Programmatic flow**: Using CLI/REST for automation and integration
33
-
34
-
### Management tenant (Tenant A)
35
-
36
-
In this example, the management tenant (Tenant A) is the parent organization that manages IP address allocations for multiple child organizations (managed tenants). The management tenant:
37
-
38
-
- Hosts the Azure Virtual Network Manager instance
39
-
- Contains the authoritative IPAM pools
40
-
- Grants permissions to managed tenant entities
41
-
42
-
### Managed tenant (Tenant B)
43
-
44
-
In this example, the managed tenant (Tenant B) is a child organization that consumes IP address allocations from the management tenant. The managed tenant:
45
-
46
-
- Hosts the virtual networks that consume IP addresses from Tenant A's IPAM pools
47
-
- Contains service principals for programmatic management
29
+
- A service principal with the *Network Contributor* role assigned at the subscription or resource level for using the Azure CLI or REST API. To create and manage a service principal, see [Create an Azure service principal with Azure CLI](/cli/azure/azure-cli-sp-tutorial-1?tabs=bash).
30
+
- Access to create or modify service principals (for programmatic approach)
48
31
49
32
## Deploy cross-tenant IPAM
50
33
51
-
In thi
34
+
In this section, you learn how to deploy a virtual network in Tenant B that uses an IP address allocation from an IPAM pool in Tenant A. The deployment can be done using either the Azure portal or Azure CLI.
52
35
53
36
# [Azure portal](#tab/azureportal)
54
37
55
38
### Create an IPAM allocation in the management tenant
56
39
57
40
1. Sign in to the [Azure portal](https://portal.azure.com/) using credentials with access to Tenant A.
58
-
59
41
1. Navigate to **Azure Virtual Network Manager** and locate your network manager instance.
60
-
61
42
1. Select **IP address pools** under **IP address management**.
62
-
63
43
1. Select the IPAM pool where you want to create an allocation.
64
-
65
44
1. Select **+ Create**>**Allocate resources**.
66
-
67
45
1. In the **Allocate resources** pane, select the **Tenant :** dropdown and choose choose the managed tenant (Tenant B) where you want to allocate IP addresses.
68
46
1. Select **Apply** and then select **Authenticate**.
69
47
@@ -77,42 +55,59 @@ In thi
77
55
1. In Tenant A's portal view, navigate to your IP address pool and select **Allocations** under **Settings**.
78
56
1. Select **Resources** and verify that the virtual network from Tenant B is listed as an allocated resource.
79
57
1. Switch to Tenant B's portal view and navigate to the virtual network that received the allocation.
80
-
1. Select **Subnets** under **Settings** and verify the name listed in the **IPAM pool** column matches the name of the IPAM pool in the management tenant (Tenant A).
58
+
1. Select **Subnets** under **Settings** and verify the name listed under **IPAM pool** matches the name of the IPAM pool in the management tenant (Tenant A).
59
+
60
+
:::image type="content" source="media/tutorial-create-secured-hub-and-spoke/managed-tenant-virtual-network-subnets-settings-thumb.png" alt-text="Screenshot of subnet on managed tenant showing IPAM Pool management." lightbox="media/tutorial-create-secured-hub-and-spoke/managed-tenant-virtual-network-subnets-settings.png":::
81
61
82
62
# [Azure CLI](#tab/azurecli)
83
63
64
+
In this section, you learn how to deploy a virtual network in Tenant B that uses an IP address allocation from an IPAM pool in Tenant A using the Azure CLI. Before running the commands, you'll need to replace the placeholders in the commands with your own values.
65
+
66
+
-`<managedTenantID>`: The tenant ID of the managed tenant (Tenant B).
67
+
-`<managementTenantID>`: The tenant ID of the management tenant (Tenant A).
68
+
-`<servicePrincipalAppID>`: The application ID of the service principal used for authentication.
69
+
-`<servicePrincipalPassword>`: The password for the service principal.
70
+
-`<managedTenantSubscriptionID>`: The subscription ID of the managed tenant (Tenant B).
71
+
-`<managedTenantResourceGroupName>`: The name of the resource group in the managed tenant (Tenant B) where the virtual network will be created.
72
+
-`<managedTenantVirtualNetworkName>`: The name of the virtual network to be created in the managed tenant (Tenant B).
73
+
-`<managementTenantSubscriptionID>`: The subscription ID of the management tenant (Tenant A).
74
+
-`<managementTenantResourceGroupName>`: The name of the resource group in the management tenant (Tenant A) where the IPAM pool is located.
75
+
-`<networkManagerName>`: The name of the Azure Virtual Network Manager instance in the management tenant (Tenant A).
76
+
-`<ipamPoolName>`: The name of the IPAM pool in the management tenant (Tenant A) that will be used for the allocation.
77
+
78
+
> [!NOTE]
79
+
> In order to use the Azure CLI for cross-tenant IPAM, you need to have a service principal with the *Network Contributor* role assigned at the subscription or resource level in Tenant B. You also need to have access to create or modify service principals in both tenants. To create and manage a service principal, see [Create an Azure service principal with Azure CLI](/cli/azure/azure-cli-sp-tutorial-1?tabs=bash).
80
+
84
81
### Configure the multi-tenant service principal
85
82
86
83
1. Sign in to Tenant B using Azure CLI:
87
84
88
85
```azurecli
89
-
az login --tenant <TENANTB_ID>
86
+
az login --tenant <managedTenantID>"
90
87
```
91
88
92
89
2. Update your service principal to be multi-tenant:
93
90
94
91
```azurecli
95
-
az ad app update --id "your-app-id" --set signInAudience=AzureADMultipleOrgs
92
+
az ad app update --id "<servicePrincipalAppID>" --set signInAudience=AzureADMultipleOrgs
96
93
```
97
94
98
95
3. Sign in to Tenant A:
99
96
100
97
```azurecli
101
-
az login --tenant <TENANTA_ID>
98
+
az login --tenant <managementTenantID>
102
99
```
103
100
104
101
4. Create a stub service principal in Tenant A using the same application ID:
105
102
106
103
```azurecli
107
-
az ad sp create --id "your-app-id"
104
+
az ad sp create --id "<servicePrincipalAppID>"
108
105
```
109
106
110
107
5. Assign the IPAM Pool User role to the service principal in Tenant A:
111
108
112
109
```azurecli
113
-
az role assignment create --assignee "your-app-id" \
0 commit comments