Skip to content

Commit e30e2ba

Browse files
authored
Merge pull request #110578 from mumian/0407-assignedidentity
update getuseridentity
2 parents 0b11928 + 0842dfb commit e30e2ba

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

articles/azure-resource-manager/templates/template-tutorial-deployment-script.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: azure-resource-manager
1111
ms.workload: multiple
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
14-
ms.date: 03/23/2020
14+
ms.date: 04/07/2020
1515
ms.topic: tutorial
1616
ms.author: jgao
1717
---
@@ -44,13 +44,12 @@ To complete this article, you need:
4444
/subscriptions/<SubscriptionID>/resourcegroups/<ResourceGroupName>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<IdentityID>
4545
```
4646

47-
Use the following PowerShell script to get the ID by providing the resource group name and the identity name.
47+
Use the following CLI script to get the ID by providing the resource group name and the identity name.
4848

49-
```azurepowershell-interactive
50-
$idGroup = Read-Host -Prompt "Enter the resource group name for the managed identity"
51-
$idName = Read-Host -Prompt "Enter the name of the managed identity"
52-
53-
$id = (Get-AzUserAssignedIdentity -resourcegroupname $idGroup -Name idName).Id
49+
```azurecli-interactive
50+
echo "Enter the Resource Group name:" &&
51+
read resourceGroupName &&
52+
az identity list -g $resourceGroupName
5453
```
5554

5655
## Open a Quickstart template

0 commit comments

Comments
 (0)