Skip to content

Commit 16c1a8b

Browse files
authored
Merge pull request #178554 from jdmartinez36/clirolefix3
1876839: Add CLI contributor role to code blocks #3
2 parents 7f012f2 + 55a4f33 commit 16c1a8b

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

articles/communication-services/quickstarts/identity/service-principal-from-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To create a registered application from the Azure CLI, you need to be logged in
4848
The following examples uses the Azure CLI to create a new registered application
4949

5050
```azurecli
51-
az ad sp create-for-rbac --name <application-name>
51+
az ad sp create-for-rbac --name <application-name> --role Contributor
5252
```
5353

5454
The `az ad sp create-for-rbac` command will return a list of service principal properties in JSON format. Copy these values so that you can use them to create the necessary environment variables in the next step.

articles/hdinsight/hdinsight-go-sdk-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ az account set -s <name or ID of subscription>
7373
Next, choose a name for your service principal and create it with the following command:
7474
7575
```azurecli-interactive
76-
az ad sp create-for-rbac --name <Service Principal Name> --sdk-auth
76+
az ad sp create-for-rbac --name <Service Principal Name> --sdk-auth --role Contributor
7777
```
7878
7979
The service principal information is displayed as JSON.

articles/machine-learning/how-to-setup-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The easiest way to create an SP and grant access to your workspace is by using t
7474
1. Create the service principal. In the following example, an SP named **ml-auth** is created:
7575
7676
```azurecli-interactive
77-
az ad sp create-for-rbac --sdk-auth --name ml-auth
77+
az ad sp create-for-rbac --sdk-auth --name ml-auth --role Contributor
7878
```
7979
8080
The output will be a JSON similar to the following. Take note of the `clientId`, `clientSecret`, and `tenantId` fields, as you will need them for other steps in this article.

articles/media-services/previous/media-services-cli-create-and-configure-aad-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For more information, see [Overview of Azure Cloud Shell](../../cloud-shell/over
4141

4242
```azurecli
4343
az login
44-
az ad sp create-for-rbac --name <appName>
44+
az ad sp create-for-rbac --name <appName> --role Contributor
4545
az role assignment create --assignee < user/app id> --role Contributor --scope <subscription/subscription id>
4646
```
4747

articles/sentinel/sap-solution-deploy-alternate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spname=<sp-name>
4444
4545
kvname=<keyvaultname>
4646
# Optional when Azure MI not enabled - Create sp user for AZ cli connection, save details for env.list file
47-
az ad sp create-for-rbac –name $spname
47+
az ad sp create-for-rbac –name $spname --role Contributor
4848
4949
SpID=$(az ad sp list –display-name $spname –query “[].appId” --output tsv
5050

articles/synapse-analytics/spark/connect-monitor-azure-synapse-spark-application-level-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To use the Azure Synapse Prometheus connector in your on-premises Prometheus ser
3737
#### 2.1 Create a service principal:
3838

3939
```bash
40-
az ad sp create-for-rbac --name <service_principal_name>
40+
az ad sp create-for-rbac --name <service_principal_name> --role Contributor
4141
```
4242

4343
The result should look like:

articles/synapse-analytics/spark/use-prometheus-grafana-to-monitor-apache-spark-application-level-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Note: This step can be skipped if you already have an AKS cluster.
4949
## Create a service principal and grant permission to Synapse workspace
5050

5151
```bash
52-
az ad sp create-for-rbac --name <service_principal_name>
52+
az ad sp create-for-rbac --name <service_principal_name> --role Contributor
5353
```
5454

5555
The result should look like:

articles/virtual-machines/linux/build-image-with-packer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Packer authenticates with Azure using a service principal. An Azure service prin
3737
Create a service principal with [az ad sp create-for-rbac](/cli/azure/ad/sp) and output the credentials that Packer needs:
3838

3939
```azurecli
40-
az ad sp create-for-rbac --query "{ client_id: appId, client_secret: password, tenant_id: tenant }"
40+
az ad sp create-for-rbac --role Contributor --query "{ client_id: appId, client_secret: password, tenant_id: tenant }"
4141
```
4242

4343
An example of the output from the preceding commands is as follows:

0 commit comments

Comments
 (0)