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/create-peering-different-subscriptions-service-principal.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,6 @@ Create **spn1-peer-vnet** with a scope to the virtual network created in the pre
101
101
--display-name spn-1-peer-vnet \
102
102
--query [].appId \
103
103
--output tsv)
104
-
echo $appid1
105
104
```
106
105
107
106
1. The SPN created in the previous step must have a redirect URI to finish the authentication process approval and must be converted to multitenant use. Use [az ad app update](/cli/azure/ad/app##az-ad-app-update) to add **https://www.microsoft.com** as a redirect URI and enable multitenant on **spn-1-peer-vnet**.
@@ -282,7 +281,6 @@ After the administrator approves **spn-2-vnet-peer**, add it to the virtual netw
282
281
--display-name spn-2-peer-vnet \
283
282
--query [].appId \
284
283
--output tsv)
285
-
echo $appid2
286
284
```
287
285
288
286
1. Use Use [az network vnet show](/cli/azure/network/vnet#az-network-vnet-show) to obtain the resource ID of **vnet-1** into a variable for use in the later steps.
@@ -360,7 +358,6 @@ Once the administrator approves **spn-1-vnet-peer**, add it to the virtual netwo
360
358
--display-name spn-1-peer-vnet \
361
359
--query [].appId \
362
360
--output tsv)
363
-
echo $appid1
364
361
```
365
362
366
363
1. Use [az network vnet show](/cli/azure/network/vnet#az-network-vnet-show) to obtain the resource ID of **vnet-2** into a variable for use in the later steps.
@@ -412,7 +409,6 @@ For the purposes of this article, sign-in to each subscription and obtain the ap
412
409
--display-name spn-1-peer-vnet \
413
410
--query [].appId \
414
411
--output tsv)
415
-
echo $appid1
416
412
```
417
413
418
414
1. Use [az login](/cli/azure/reference-index#az-login) to sign-in to **subscription-2** with a regular user account.
@@ -441,7 +437,7 @@ For the purposes of this article, sign-in to each subscription and obtain the ap
441
437
echo $appid2
442
438
```
443
439
444
-
1. Use [az logout](/cli/azure/reference-index#az-logout)Sign out of the Azure CLI session with the following command. **Don't close the terminal**.
440
+
1. Use [az logout](/cli/azure/reference-index#az-logout) to sign out of the Azure CLI session with the following command. **Don't close the terminal**.
445
441
446
442
```azurecli
447
443
az logout
@@ -472,7 +468,7 @@ For the purposes of this article, sign-in to each subscription and obtain the ap
472
468
1. Use [az account set](/cli/azure/account#az-account-set) to change the context to **subscription-1**.
473
469
474
470
```azurecli
475
-
az account set --subscription "subscription-1-subscription-id-NOT-ENTRA-ID"
471
+
az account set --subscription "subscription-1-subscription-id-NOT-ENTRA-TENANT-ID"
476
472
```
477
473
478
474
1. Use [az network vnet peering create](/cli/azure/network/vnet/peering#az-network-vnet-peering-create) to create the virtual network peering between **vnet-1** and **vnet-2**.
@@ -498,7 +494,7 @@ For the purposes of this article, sign-in to each subscription and obtain the ap
498
494
1. Use [az account set](/cli/azure/account#az-account-set) to change the context to **subscription-2**.
499
495
500
496
```azurecli
501
-
az account set --subscription "subscription-2-subscription-id-NOT-ENTRA-ID"
497
+
az account set --subscription "subscription-2-subscription-id-NOT-ENTRA-TENANT-ID"
502
498
```
503
499
504
500
1. Use [az network vnet peering create](/cli/azure/network/vnet/peering#az-network-vnet-peering-create) to create the virtual network peering between **vnet-2** and **vnet-1**.
0 commit comments