SHARE
TWEET

Untitled

a guest Nov 15th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ACR_NAME=acramdemo
  2. SERVICE_PRINCIPAL_NAME=acr-service-principal
  3. ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
  4. SP_PASSWD=$(az ad sp create-for-rbac --name http://$SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpull --query password --output tsv)
  5. SP_APP_ID=$(az ad sp show --id http://$SERVICE_PRINCIPAL_NAME --query appId --output tsv)
  6. echo "Service principal ID: $SP_APP_ID"
  7. echo "Service principal password: $SP_PASSWD"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top