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
1. The service principal must have **User.Read.All** permissions to the directory. Use [az ad app permission add](/cli/azure/ad/app#az-ad-app-permission-add) and [az ad app permission grant](/cli/azure/ad/app#az-ad-app-permission-grant) to add the Microsoft Graph permissions of **User.Read.all** to the service principal.
254
+
1. The service principal must have **User.Read.All** permissions to the directory. Use [Get-AzureADApplication](/powershell/module/azuread/get-azureadapplication), [Set-AzureADApplication](/powershell/module/azuread/set-azureadapplication), and [New-AzureADUserAppRoleAssignment](/powershell/module/azuread/new-azureaduserapproleassignment) to add the Microsoft Graph permissions of **User.Read.all** to the service principal.
252
255
253
256
```azurepowershell
254
257
# Add permission
@@ -287,7 +290,7 @@ Create **spn1-peer-vnet** with a scope to the virtual network created in the pre
1. Use [New-AzVirtualNetwork](/powershell/module/az.network/new-azvirtualnetwork) to create a virtual network named **vnet-1** in **subscription-1**.
@@ -352,7 +358,7 @@ Create **spn1-peer-vnet** with a scope to the virtual network created in the pre
352
358
353
359
Create a subnet configuration named **subnet-1** with [Add-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/add-azvirtualnetworksubnetconfig):
1. The service principal must have **User.Read.All** permissions to the directory. Use [az ad app permission add](/cli/azure/ad/app#az-ad-app-permission-add) and [az ad app permission grant](/cli/azure/ad/app#az-ad-app-permission-grant) to add the Microsoft Graph permissions of **User.Read.All** to the service principal.
504
+
1. The service principal must have **User.Read.All** permissions to the directory. Use [Get-AzureADApplication](/powershell/module/azuread/get-azureadapplication), [Set-AzureADApplication](/powershell/module/azuread/set-azureadapplication), and [New-AzureADUserAppRoleAssignment](/powershell/module/azuread/new-azureaduserapproleassignment) to add the Microsoft Graph permissions of **User.Read.all** to the service principal.
499
505
500
506
```azurepowershell
501
507
# Add permission
@@ -534,7 +540,7 @@ Create **spn-2-peer-vnet** with a scope to the virtual network created in the pr
@@ -549,10 +555,10 @@ An administrator in the **subscription-1** Microsoft Entra ID tenant must approv
549
555
550
556
# [**Azure CLI**](#tab/create-peering-cli)
551
557
552
-
1. Use [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) to sign-in to **subscription-2**.
558
+
1. Use [az login](/cli/azure/reference-index#az-login) to sign-in to **subscription-2**.
553
559
554
-
```azurepowershell
555
-
Connect-AzAccount
560
+
```azurecli
561
+
az login
556
562
```
557
563
558
564
1. Use [az ad sp list](/cli/azure/ad/sp#az-ad-sp-list) to obtain the appId of **spn-2-peer-vnet**. Note the appID in the output. This appID is used in the authentication URL in the later steps.
@@ -583,12 +589,12 @@ An administrator in the **subscription-1** Microsoft Entra ID tenant must approv
1. [az login](/cli/azure/reference-index#az-login) to sign-in to **subscription-2**.
592
+
1. Use [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) to sign-in to **subscription-2**.
587
593
588
-
```azurecli
589
-
az login
594
+
```azurepowershell
595
+
Connect-AzAccount
590
596
```
591
-
597
+
592
598
1. Use [az ad sp list](/cli/azure/ad/sp#az-ad-sp-list) to obtain the appId of **spn-2-peer-vnet**. Note the appID in the output. This appID is used in the authentication URL in the later steps.
593
599
594
600
```azurecli
@@ -599,7 +605,7 @@ An administrator in the **subscription-1** Microsoft Entra ID tenant must approv
599
605
echo $appid2
600
606
```
601
607
602
-
1. Use the appid for **spn-2-peer-vnet** and the Microsoft Entra ID tenant ID for **subcription-1** to build the sign-in URL for the approval. The URL is built from the following example:
608
+
1. Use the appid for **spn-2-peer-vnet** and the Microsoft Entra ID tenant ID for **subscription-1** to build the sign-in URL for the approval. The URL is built from the following example:
0 commit comments