Configuring a Service Principal via CLI

  • Create the App registration using the following command:

    az ad app create --display-name <display-name> --homepage <home page url> --identifier-uris <Service Principal logon url> --password <Service Principal logon password>


  • Create the Service Principal and link it to the app using the following command:

    az ad sp create --id <app id | identifier uri >


  • Assign a role to the App using the following command:

    az role assignment create --role <subscription role> --assignee <app id | identifier uri>


In the example to the right, the built-in role of Owner and Identifier URL are used.

  • To verify, login via the service principal using the following command:

    az login –service-principal -u <identifier uri> -p <password> -t <tenant id | domain>


  • The service principal can now be used with SoftNAS.