Skip to content

Commit 6198882

Browse files
committed
Added role for CLI.
1 parent aefa5c9 commit 6198882

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
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/databox-online/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ You can also register resource providers via the `az cli`. For more information,
9191
Here is an example.
9292

9393
```azurecli
94-
PS /home/user> az ad sp create-for-rbac --skip-assignment --name "https://azure-arc-for-ase-k8s"
94+
PS /home/user> az ad sp create-for-rbac --skip-assignment --name "https://azure-arc-for-ase-k8s" --role Contributor
9595
{
9696
"appId": "aa8a082e-0fa1-4a82-b51c-e8b2a9fdaa8b",
9797
"displayName": "azure-arc-for-ase-k8s",

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/key-vault/general/manage-with-cli2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ For detailed steps on registering an application with Azure Active Directory you
195195
To register an application in Azure Active Directory:
196196

197197
```azurecli
198-
az ad sp create-for-rbac -n "MyApp" --password "hVFkk965BuUv" --skip-assignment
198+
az ad sp create-for-rbac -n "MyApp" --password "hVFkk965BuUv" --role Contributor --skip-assignment
199199
# If you don't specify a password, one will be created for you.
200200
```
201201

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
@@ -46,7 +46,7 @@ spname=<sp-name>
4646
4747
kvname=<keyvaultname>
4848
# Optional when Azure MI not enabled - Create sp user for AZ cli connection, save details for env.list file
49-
az ad sp create-for-rbac –name $spname
49+
az ad sp create-for-rbac –name $spname --role Contributor
5050
5151
SpID=$(az ad sp list –display-name $spname –query “[].appId” --output tsv
5252

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)