|
528 | 528 | You may also use `az role assignment create` to create role assignments for this service principal later. |
529 | 529 | See [steps to add a role assignment](https://aka.ms/azadsp-more) for more information. |
530 | 530 | examples: |
531 | | - - name: Create without role assignment. |
532 | | - text: az ad sp create-for-rbac |
533 | | - - name: Create using a custom display name. |
534 | | - text: az ad sp create-for-rbac -n MyApp |
535 | | - - name: Create with a Contributor role assignments on specified scopes. To retrieve current subscription ID, run `az account show --query id --output tsv`. |
536 | | - text: az ad sp create-for-rbac -n MyApp --role Contributor --scopes /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup2 |
537 | | - - name: Create using a self-signed certificate. |
538 | | - text: az ad sp create-for-rbac --create-cert |
539 | | - - name: Create using a self-signed certificate, and store it within KeyVault. |
540 | | - text: az ad sp create-for-rbac --keyvault MyVault --cert CertName --create-cert |
541 | | - - name: Create using existing certificate in KeyVault. |
542 | | - text: az ad sp create-for-rbac --keyvault MyVault --cert CertName |
| 531 | +- name: Create without role assignment. |
| 532 | + text: az ad sp create-for-rbac |
| 533 | +- name: Create using a custom display name. |
| 534 | + text: az ad sp create-for-rbac -n MyApp |
| 535 | +- name: Create with a Contributor role assignments on specified scopes. To retrieve current subscription ID, run `az account show --query id --output tsv`. |
| 536 | + text: az ad sp create-for-rbac -n MyApp --role Contributor --scopes /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup2 |
| 537 | +- name: Create using a self-signed certificate. |
| 538 | + text: az ad sp create-for-rbac --create-cert |
| 539 | +- name: Create using an existing certificate string. |
| 540 | + text: az ad sp create-for-rbac --cert "MIICoT..." |
| 541 | +- name: Create using an existing certificate file. |
| 542 | + text: |- |
| 543 | + az ad sp create-for-rbac --cert "@~/cert.pem" |
| 544 | + `cert.pem` contains the following content |
| 545 | + -----BEGIN CERTIFICATE----- <<< this line is optional |
| 546 | + MIICoT... |
| 547 | + -----END CERTIFICATE----- <<< this line is optional |
| 548 | +- name: Create using a self-signed certificate, and store it within Azure Key Vault. |
| 549 | + text: az ad sp create-for-rbac --keyvault MyVault --cert CertName --create-cert |
| 550 | +- name: Create using existing certificate in Azure Key Vault. |
| 551 | + text: az ad sp create-for-rbac --keyvault MyVault --cert CertName |
543 | 552 | """ |
544 | 553 |
|
545 | 554 | helps['ad sp credential'] = """ |
|
0 commit comments