Create Azure Service Principal

How to

  1. To create an Azure service principal, install Azure CLI first, by following this link.
  2. After installing Azure CLI, open up a new terminal and log in using the following command in your terminal window: az loginIf your account has access to multiple subscriptions, ensure you are creating the service principal in the correct subscription with az account set
  3. Follow the instruction prompt to grant the terminal access to your Azure account.
  4. After logging in, run the script azure.sh to create the service principal. To download azure.sh, please scroll to the bottom of the page and find the attached file.
  5. After logging in, run the script azure.sh to create the service principal. The following information are returned by the script:
    • App ID: the ID of the service principal, needed for entering into CloudTest as well as deletion
    • Tenant ID: the ID of the current Azure tenant
    • Secret: also known as service principal secret, it is the authentication password for your service principal

      Azure.sh output