Skip to content

Commit 449e4e3

Browse files
authored
Improve guidance on ASB usage reporting config (#7205)
1 parent 3299d63 commit 449e4e3

File tree

1 file changed

+42
-19
lines changed

1 file changed

+42
-19
lines changed

servicepulse/usage-config.md

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,65 @@ Look at the [Diagnostics](#diagnostics) tab to diagnose connection issues.
2727

2828
Steps:
2929

30-
1. Create an application Id for ServiceControl
31-
2. Assign the role `Monitoring Reader` to this application Id
32-
3. Update ServiceControl configuration and set at minimum `TenantId`, `SubscriptionId`, `ClientId` (aka ApplicationId) and its accompanying `ClientSecret`
30+
1. Create an **ApplicationId (aka ClientId)** for ServiceControl
31+
2. Assign it the **Monitoring Reader** role
32+
3. Configure for the ServiceControl instance at minimum:
33+
- `TenantId`
34+
- `SubscriptionId`
35+
- `ClientId`
36+
- `ClientSecret`
37+
3338

3439
#### Using Azure Portal
3540

36-
- Create App
37-
-* *Home > App registrations** > ➕ New registration
38-
- Assign application to role:
39-
- **Home > Service Bus > {service bus namespace} > Access control (IAM) > ➕ Add
40-
- Role: `Monitoring Reader`
41-
- Members: ➕ Select Members > {application name}
42-
- Review and Assign
41+
Instructions when using the Azure Portal, alternative is using the Azure CLI listed below.
42+
43+
44+
1. Create App
45+
- Native to: **Home > App registrations**
46+
- Select **➕ New registration**
47+
2. Assign application to role:
48+
- Natigate to: **Home > Service Bus > {service bus namespace} > Access control (IAM)**
49+
- Select: **➕ Add**
50+
- Enter:
51+
- Role: `Monitoring Reader`
52+
- Members: Select **➕ Select Members > {application name}**
53+
- Select: **Review and Assign**
4354

55+
#### Using Azure CLI
4456

45-
#### Setup using Azure CLI
57+
Instructions when using the Azure CLI or scripting, alternative is using the Azure Portal above.
4658

4759
```ps1
48-
# set correct context and subscription
60+
# Set context first
4961
az account set --subscription "YourAzureSubscriptionName"
50-
Set-AzContext -Subscription "YourAzureSubscriptionName"
5162
52-
# Application ID: az ad app create --display-name ServiceControlUsageReporting
63+
# Create ApplicationId (ClientId)
64+
az ad app create --display-name ServiceControlUsageReporting
65+
66+
# Store your ApplicationId (ClientId)
5367
$applicationId = "<Your Application ID>"
5468
55-
# Azure Service Bus subscription ID: az servicebus namespace list
69+
# List subscription ID
70+
az servicebus namespace list
71+
72+
# Store your Subscription ID
5673
$subscriptionId = "<Your Subscription ID>"
5774
58-
# Resource group name: az group list
59-
$resourceGroupName = "<Your Resource group Name>"
60-
# Assign role to resource group
75+
# List resource group
76+
az group list
77+
78+
# Store resource group name
79+
$resourceGroupName = "<Your Resource Group Name>"
6180
81+
# Assign role to resource group
6282
$scope = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName"
83+
6384
# or to specific resource in resource group
64-
#$scope = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.ServiceBus/namespaces/$namespaceName
85+
$scope = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.ServiceBus/namespaces/$namespaceName
86+
# end alternative
6587
88+
# assign Monitoring Reader role to ApplicationId
6689
New-AzRoleAssignment -ApplicationId $applicationId -RoleDefinitionName "Monitoring Reader" -Scope $scope
6790
```
6891

0 commit comments

Comments
 (0)