Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 8d2f411

Browse files
authored
Merge pull request #233 from rob-foulkrod/fix-lab12-sp-create
M05-LAB12: Service Principal creation failure
2 parents e5257bd + 21ee714 commit 8d2f411

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Instructions/Labs/AZ400_M05_Integrating_Azure_Key_Vault_with_Azure_DevOps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ A service principal is automatically created by Azure Pipeline when you connect
104104
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a service principal (replace the `<service-principal-name>` with any unique string of characters consisting of letters and digits):
105105

106106
```
107-
az ad sp create-for-rbac --name <service-principal-name> --role Contributor
107+
SUB_ID=$(az account show --query id --output tsv)
108+
az ad sp create-for-rbac --name <service-principal-name> --role contributor --scope /subscriptions/$SUB_ID
108109
```
109110
110111
> **Note**: The command will generate a JSON output. Copy the output to text file. You will need it later in this lab.

0 commit comments

Comments
 (0)