File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ TODO:
223
223
- Should we be using a newer API version?
224
224
-->
225
225
``` bash
226
- token=$( curl http://localhost:50342/oauth2/token --data " resource=https://management.azure.com/" -H Metadata:true -s | jq -r " .accessToken " )
226
+ token=$( curl http://localhost:50342/oauth2/token --data " resource=https://management.azure.com/" -H Metadata:true -s | jq -r " .access_token " )
227
227
curl https://management.azure.com/providers/Microsoft.Portal/usersettings/cloudconsole? api-version=2017-12-01-preview -H Authorization:" Bearer $token " -s | jq
228
228
```
229
229
@@ -234,7 +234,7 @@ TODO:
234
234
Uri = "$env:MSI_ENDPOINT`?resource=https://management.core.windows.net/"
235
235
Headers = @{Metadata='true'}
236
236
}
237
- $token= ((Invoke-WebRequest @parameters ).content | ConvertFrom-Json).accessToken
237
+ $token= ((Invoke-WebRequest @parameters ).content | ConvertFrom-Json).access_token
238
238
$parameters = @{
239
239
Uri = 'https://management.azure.com/providers/Microsoft.Portal/usersettings/cloudconsole?api-version=2017-12-01-preview'
240
240
Headers = @{Authorization = "Bearer $token"}
@@ -259,7 +259,7 @@ again.
259
259
Bash:
260
260
261
261
``` bash
262
- TOKEN=$( az account get-access-token --resource " https://management.azure.com/" | jq -r " .accessToken " )
262
+ TOKEN=$( az account get-access-token --resource " https://management.azure.com/" | jq -r " .access_token " )
263
263
curl -X DELETE https://management.azure.com/providers/Microsoft.Portal/usersettings/cloudconsole? api-version=2017-12-01-preview -H Authorization:" Bearer $TOKEN "
264
264
```
265
265
You can’t perform that action at this time.
0 commit comments