Edit

Using managed identities with GeoCatalog resource

This article shows you how to add, update, or remove a user-assigned managed identity for a GeoCatalog resource using the Azure CLI or Azure SDKs.

Prerequisites

When to use managed identities

Managed identities are the recommended authentication method for applications running on Azure that need to access your GeoCatalog. They eliminate the need to manage credentials (secrets or certificates) in code or configuration.

Scenario Recommended approach
App running on Azure (VM, App Service, Functions, Container Apps) User-assigned managed identity (this article)
App running outside Azure (on-premises, other cloud) Service principal via app registration — see setup guide
User accessing via Explorer, QGIS, or portal Delegated access (OAuth2 user_impersonation)
CLI/SDK scripting with user credentials az login with RBAC role assignment

For token acquisition in application code, use the Azure Identity client library. For a complete guide to all authentication options, see Configure application authentication.

Add or update a user-assigned managed identity

Use the PATCH method to add or update a managed identity on an existing GeoCatalog resource. PATCH performs a partial update, modifying only the identity configuration without affecting other resource properties.

# Define variables (Replace these with your specific values)
$SUBSCRIPTION_ID = "{your-subscription-id}" # <-- Modify this line
$RESOURCE_GROUP = "{your-resource-group}" # <-- Modify this line
$GEOCATALOG_NAME = "{your-geocatalog-name}" # <-- Modify this line
$IDENTITY_NAME = "{your-identity-name}" # <-- Modify this line

# Construct the user-assigned identity URI
$USER_ASSIGNED_IDENTITY = "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$IDENTITY_NAME"

# Add or update the managed identity on the GeoCatalog
az rest --method PATCH `
  --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Orbital/geoCatalogs/${GEOCATALOG_NAME}?api-version=2026-04-15" `
  --headers "Content-Type=application/json" `
  --body "{'identity': {'type': 'UserAssigned', 'userAssignedIdentities': {'$USER_ASSIGNED_IDENTITY': {}}}}"

Remove a user-assigned managed identity

To remove a specific user-assigned managed identity from a GeoCatalog resource, set the identity value to null in the userAssignedIdentities map.

# Define variables (Replace these with your specific values)
$SUBSCRIPTION_ID = "{your-subscription-id}" # <-- Modify this line
$RESOURCE_GROUP = "{your-resource-group}" # <-- Modify this line
$GEOCATALOG_NAME = "{your-geocatalog-name}" # <-- Modify this line
$IDENTITY_NAME = "{your-identity-name}" # <-- Modify this line

# Construct the user-assigned identity URI
$USER_ASSIGNED_IDENTITY = "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$IDENTITY_NAME"

# Remove the specified identity from the GeoCatalog
az rest --method PATCH `
  --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Orbital/geoCatalogs/${GEOCATALOG_NAME}?api-version=2026-04-15" `
  --headers "Content-Type=application/json" `
  --body "{'identity': {'type': 'UserAssigned', 'userAssignedIdentities': {'$USER_ASSIGNED_IDENTITY': null}}}"

Next steps