Skip to content

Commit 47fc21b

Browse files
authored
Merge pull request #89680 from spelluru/sbus39218
added the CLI example
2 parents 163a54d + 883b3e2 commit 47fc21b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

articles/service-bus-messaging/service-bus-managed-service-identity.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ Before you assign an RBAC role to a security principal, determine the scope of a
5252

5353
The following list describes the levels at which you can scope access to Service Bus resources, starting with the narrowest scope:
5454

55-
- **Queue**, **topic**, or **subscription**: Role assignment applies to the specific Service Bus entity. Currently, the Azure portal doesn't support assigning users/groups/managed identities to Service Bus RBAC roles at the subscription level.
55+
- **Queue**, **topic**, or **subscription**: Role assignment applies to the specific Service Bus entity. Currently, the Azure portal doesn't support assigning users/groups/managed identities to Service Bus RBAC roles at the subscription level. Here's an example of using the Azure CLI command: [az-role-assignment-create](/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-create) to assign an identity to a Service Bus RBAC role:
56+
57+
```powershell
58+
az role assignment create \
59+
--role $service_bus_role \
60+
--assignee $assignee_id \
61+
--scope /subscriptions/$subscription_id/resourceGroups/$resource_group/providers/Microsoft.ServiceBus/namespaces/$service_bus_namespace/topics/$service_bus_topic/subscriptions/$service_bus_subscription
62+
```
5663
- **Service Bus namespace**: Role assignment spans the entire topology of Service Bus under the namespace and to the consumer group associated with it.
5764
- **Resource group**: Role assignment applies to all the Service Bus resources under the resource group.
5865
- **Subscription**: Role assignment applies to all the Service Bus resources in all of the resource groups in the subscription.

0 commit comments

Comments
 (0)