cheatsheet-azurecli
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cheatsheet-azurecli [2025/10/25 18:06] – created - external edit 127.0.0.1cheatsheet-azurecli [2025/11/12 21:30] (current) – [Managed Identity] sjoerd
Line 446: Line 446:
   --resource-group $rg `   --resource-group $rg `
   --location $loc   --location $loc
 +
 +# Get the resource id of the managed identity
 +$idId = (az identity show `
 +  --name $id `
 +  --resource-group $rg `
 +  --query "id").Trim('"')
  
 # Get the managed identity client id (Client Id (Application Id) is used to authenticate workloads) # Get the managed identity client id (Client Id (Application Id) is used to authenticate workloads)
-$idId = az identity show `+$idClientId = az identity show `
   --name $id `   --name $id `
   --resource-group $rg `   --resource-group $rg `
   --query clientId `   --query clientId `
   --output tsv   --output tsv
-Write-Host $idId+Write-Host $idClientId
  
 # Get the managed identity object id (Object (Principal) Id is used to authorize workloads, aka, assign permissions in Azure) # Get the managed identity object id (Object (Principal) Id is used to authorize workloads, aka, assign permissions in Azure)
cheatsheet-azurecli.1761415596.txt.gz · Last modified: by 127.0.0.1