|
|
@ -194,7 +194,7 @@ _azure_getaccess_token() { |
|
|
|
body="resource=$(printf "%s" 'https://management.core.windows.net/' | _url_encode)&client_id=$(printf "%s" "$clientID" | _url_encode)&client_secret=$(printf "%s" "$clientSecret" | _url_encode)&grant_type=client_credentials" |
|
|
|
_debug data "$body" |
|
|
|
response="$(_post "$body" "https://login.windows.net/$TENANTID/oauth2/token" "" "POST")" |
|
|
|
accesstoken=$(echo "$response" | _egrep_o "\"access_token\":\"[^\"]*\"" | head -n 1 | cut -d : -f 2 | tr -d \") |
|
|
|
accesstoken=$(echo "$response" | _egrep_o "\"access_token\":\"[^\"]*\"" | _head_n 1 | cut -d : -f 2 | tr -d \") |
|
|
|
_debug2 "response $response" |
|
|
|
|
|
|
|
if [ -z "$accesstoken" ]; then |
|
|
|