Create an Azure Active Directory application

In this section, you create an Azure Active Directory (Azure AD) application and service principal objects. Anthos clusters on Azure uses these objects to store configuration information on Azure.

  1. To create the Azure AD application, run the following command:

    az ad app create --display-name APPLICATION_NAME

    Replace APPLICATION_NAME with a name for your application—for example, anthos-clusters.

  2. To save the application's ID to an environment variable for later use, run the following command:

    APPLICATION_ID=$(az ad app list --all \
     --query "[?displayName=='APPLICATION_NAME'].appId" \
     --output tsv)

    Replace APPLICATION_NAME with the name of your application.

  3. To create a service principal for the application, run the following command:

    az ad sp create --id "${APPLICATION_ID}"

What's next