Skip to content

Commit

Permalink
Fixed for correct output id, added example command for search on name (
Browse files Browse the repository at this point in the history
…#281)

Co-authored-by: Jack Tracey <[email protected]>
  • Loading branch information
johnlokerse and jtracey93 authored Jul 8, 2022
1 parent 754ba2c commit 8b0a0ce
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions infra-as-code/bicep/modules/roleAssignments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ az identity show --resource-group <RESOURCE_GROUP> --name <IDENTITY_NAME> --quer

# Identify Object Id for Service Principal (App Registration)
# Require read permission to query Azure Active Directory
# Example: az ad sp show --id c705dc53-7c95-42bc-b1d5-75e172571370 --query objectId
az ad sp show --id <APP_REGISTRATION_APPLICATION_ID> --query objectId
# Example: az ad sp show --id c705dc53-7c95-42bc-b1d5-75e172571370 --query id
az ad sp show --id <APP_REGISTRATION_APPLICATION_ID> --query id

# Identify Object Id for Service Principal (App Registration)
# Require read permission to query Azure Active Directory
# Beware of duplicates, since app registation names are not unique.
# Example: az ad sp list --filter "displayName eq '<APP_REGISTRATION_NAME>'" --query '[].{name:appDisplayName, objectId:id}'
az ad sp list --filter "displayName eq '<APP_REGISTRATION_NAME>'" --query '[].{name:appDisplayName, objectId:id}'

# Identify Object Id for Security Group
# Require read permission to query Azure Active Directory
# Example: az ad group show --group SG_ALZ_SECURITY --query objectId
az ad group show --group <SECURITY_GROUP_NAME> --query objectId
# Example: az ad group show --group SG_ALZ_SECURITY --query id
az ad group show --group <SECURITY_GROUP_NAME> --query id
```

### PowerShell - Find Object ID
Expand Down

0 comments on commit 8b0a0ce

Please sign in to comment.