Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
There are multiple ways to generate the Service Principal for Azure AD. Say, through portal, CLI or PowerShell. I always used Azure portal for this registration. But started liking CLI way of generating principal which is very simple and easy to register and generate the required keys and move on. Yes, many times you would find this step as a prerequisites or in mid way to continue say Azure Data Lake Analytics query or ADAL programming.
$ az login
$ az account list -o table
$ az ad sp create-for-rbac --name MikkyDemoTraining --years 1output: { "appId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "displayName": "MikkyDemoTraining", "name": "https://MikkyDemoTraining", "password": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "tenant": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }
Ps: Take note of the password value for later references, otherwise you may need to regenerate again.
For more detail - /en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest
Please sign in to use this experience.
Sign in