Home > OS >  Azure Service principal name
Azure Service principal name

Time:08-10

May I know how in Azure CLI , to get back the name of the service principal name by the client ID >

And CLI command I can do that ?

I would like to see if I can get back the service principal name

CodePudding user response:

Since a Service Principal is essentially a user in Azure AD, you would need to use Azure AD CLI. The command you would want to use is az ad user show.

Something like:

az ad user show --id <service-principal-client-id>

CodePudding user response:

I have reproduced from my end, Using the below Cli command you can get the output:

xxx-Clientid

az ad sp show --id xxx

enter image description here

Alternatively, Using below powershell command you can get :

Get-AzureADServicePrincipal

enter image description here

References taken from:

  • Related