Below command I am using to get the authorization token
$AUTHORIZATION=$(curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \
https://login.microsoftonline.com/$(tenant-id)/oauth2/token \
-d 'client_id=$(ado-app-id)' \
-d 'grant_type=client_credentials' \
-d 'resource=https%3A%2F%2Fmanagement.core.windows.net%2F' \
-d 'client_secret=$(ado-secret)'
)
echo "$AUTHORIZATION"
$TOKEN=$(echo -n $AUTHORIZATION| jq -r .access_token | tr -d'"')