Skip to content

Commit 2c1aea1

Browse files
authored
Merge pull request #178393 from jdmartinez36/clirolefix2
1876839: Add CLI contributor role to code blocks #2
2 parents 400e759 + 8c7e828 commit 2c1aea1

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

articles/application-gateway/ingress-controller-multiple-namespace-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ options:
174174
## Alternatively you can use Service Principal credentials
175175
# armAuth:
176176
# type: servicePrincipal
177-
# secretJSON: <<Generate this value with: "az ad sp create-for-rbac --subscription <subscription-uuid> --sdk-auth | base64 -w0" >>
177+
# secretJSON: <<Generate this value with: "az ad sp create-for-rbac --subscription <subscription-uuid> --role Contributor --sdk-auth | base64 -w0" >>
178178
179179
################################################################################
180180
# Specify if the cluster is Kubernetes RBAC enabled or not

articles/application-gateway/ingress-controller-troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ armAuth:
313313
## Alternatively you can use Service Principal credentials
314314
# armAuth:
315315
# type: servicePrincipal
316-
# secretJSON: <<Generate this value with: "az ad sp create-for-rbac --subscription <subscription-uuid> --sdk-auth | base64 -w0" >>
316+
# secretJSON: <<Generate this value with: "az ad sp create-for-rbac --subscription <subscription-uuid> --role Contributor --sdk-auth | base64 -w0" >>
317317
318318
################################################################################
319319
# Specify if the cluster is Kubernetes RBAC enabled or not

articles/azure-app-configuration/use-key-vault-references-spring-boot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ To add a secret to the vault, you need to take just a few additional steps. In t
9393
1. In this tutorial, you use a service principal for authentication to Key Vault. To create this service principal, use the Azure CLI [az ad sp create-for-rbac](/cli/azure/ad/sp#az_ad_sp_create_for_rbac) command:
9494

9595
```azurecli
96-
az ad sp create-for-rbac -n "http://mySP" --sdk-auth
96+
az ad sp create-for-rbac -n "http://mySP" --role Contributor --sdk-auth
9797
```
9898
9999
This operation returns a series of key/value pairs:

articles/azure-arc/kubernetes/create-onboarding-service-principal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Walk through the following steps to learn how to use service principals for conn
2121

2222
Create a new service principal with an informative name that is unique for your Azure Active Directory tenant.
2323

24-
```console
25-
az ad sp create-for-RBAC --skip-assignment --name "https://azure-arc-for-k8s-onboarding"
24+
```azurecli
25+
az ad sp create-for-RBAC --name "https://azure-arc-for-k8s-onboarding"
2626
```
2727

2828
**Output:**
@@ -50,7 +50,7 @@ You can limit permissions further by passing in the appropriate `--scope` argume
5050
| Subscription | `--scope /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` | Service principal can register cluster in any resource group under that subscription. |
5151
| Resource Group | `--scope /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup` | Service principal can __only__ register clusters in the resource group `myGroup`. |
5252

53-
```console
53+
```azurecli
5454
az role assignment create \
5555
--role 34e09817-6cbe-4d01-b1a2-e0eac5743d41 \ # this is the id for the built-in role
5656
--assignee 22cc2695-54b9-49c1-9a73-2269592103d8 \ # use the appId from the new SP

articles/azure-netapp-files/azacsnap-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Create RBAC Service Principal
109109
1. Create a service principal using Azure CLI per the following example
110110
111111
```azurecli-interactive
112-
az ad sp create-for-rbac --sdk-auth
112+
az ad sp create-for-rbac --role Contributor --sdk-auth
113113
```
114114
115115
1. This should generate an output like the following example:

articles/azure-netapp-files/azure-netapp-files-develop-with-rest-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The REST API specification for Azure NetApp Files is published through [GitHub](
4343
2. Enter the following command in the Azure CLI:
4444

4545
```azurecli
46-
az ad sp create-for-rbac --name $YOURSPNAMEGOESHERE
46+
az ad sp create-for-rbac --name $YOURSPNAMEGOESHERE --role Contributor
4747
```
4848
4949
The command output is similar to the following example:

articles/azure-netapp-files/develop-rest-api-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The REST API specification for Azure NetApp Files is published through [GitHub](
3636
2. Enter the following command in the Azure CLI:
3737

3838
```azurecli
39-
$RBAC_SP = az ad sp create-for-rbac --name <YOURSPNAMEGOESHERE> | ConvertFrom-Json
39+
$RBAC_SP = az ad sp create-for-rbac --name <YOURSPNAMEGOESHERE> --role Contributor | ConvertFrom-Json
4040
```
4141
4242
To display the service principal information, type `$RBAC_SP` and press Enter.

articles/cognitive-services/Computer-vision/spatial-analysis-logging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ After setting up Azure Monitor, you will need to create credentials that enable
8383
> [!NOTE]
8484
> This command requires you to have Owner privileges on the subscription.
8585
86-
```bash
86+
```azurecli
8787
# Find your Azure IoT Hub resource ID by running this command. The resource ID should start with something like
8888
# "/subscriptions/b60d6458-1234-4be4-9885-c7e73af9ced8/resourceGroups/..."
8989
az iot hub list
@@ -430,7 +430,7 @@ Create a new support ticket at the [New support request](https://ms.portal.azure
430430

431431
1. Set **Issue Type** to be `Technical`.
432432
2. Select the subscription that you are utilizing to deploy the Spatial Analysis container.
433-
3. Select `My services` and select `Cognitive Services` as the the service.
433+
3. Select `My services` and select `Cognitive Services` as the service.
434434
4. Select the resource that you are utilizing to deploy the Spatial Analysis container.
435435
5. Write a brief description detailing the problem you are facing.
436436
6. Select `Spatial Analysis` as your problem type.

articles/cognitive-services/Custom-Vision-Service/logo-detector-mobile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ az account set --subscription "<subscription name or subscription id>"
113113
Then create your service principal. (This process might take some time to finish.)
114114

115115
```azurecli
116-
az ad sp create-for-rbac --name <servicePrincipalName> --password <yourSPStrongPassword>
116+
az ad sp create-for-rbac --name <servicePrincipalName> --role Contributor --password <yourSPStrongPassword>
117117
```
118118

119119
Upon successful completion, you should see the following JSON output, including the necessary credentials.

0 commit comments

Comments
 (0)