update az cli commands

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
Hannah Hunter 2022-09-12 13:42:35 -05:00
parent 8f7a7d8495
commit ce65201f5d
1 changed files with 4 additions and 7 deletions

View File

@ -110,8 +110,8 @@ APP_NAME="dapr-application"
# Create the app
APP_ID=$(az ad app create \
--display-name "${APP_NAME}" \
--available-to-other-tenants false \
--oauth2-allow-implicit-flow false \
--enable-access-token-issuance false \
--enable-id-token-issuance false
| jq -r .appId)
```
@ -124,8 +124,7 @@ To create a **client secret**, then run this command. This will generate a rando
```sh
az ad app credential reset \
--id "${APP_ID}" \
--years 2 \
--password $(openssl rand -base64 30)
--years 2
```
The output of the command above will be similar to this:
@ -133,7 +132,6 @@ The output of the command above will be similar to this:
```json
{
"appId": "c7dd251f-811f-4ba2-a905-acd4d3f8f08b",
"name": "c7dd251f-811f-4ba2-a905-acd4d3f8f08b",
"password": "Ecy3XG7zVZK3/vl/a2NSB+a1zXLa8RnMum/IgD0E",
"tenant": "cd4b2887-304c-47e1-b4d5-65447fdd542b"
}
@ -164,7 +162,6 @@ The output of the command above should look like:
{
"appId": "c7dd251f-811f-4ba2-a905-acd4d3f8f08b",
"fileWithCertAndPrivateKey": "/Users/alessandro/tmpgtdgibk4.pem",
"name": "c7dd251f-811f-4ba2-a905-acd4d3f8f08b",
"password": null,
"tenant": "cd4b2887-304c-47e1-b4d5-65447fdd542b"
}
@ -190,7 +187,7 @@ Once you have created an Azure AD application, create a Service Principal for th
```sh
SERVICE_PRINCIPAL_ID=$(az ad sp create \
--id "${APP_ID}" \
| jq -r .objectId)
| jq -r .id)
echo "Service Principal ID: ${SERVICE_PRINCIPAL_ID}"
```