Getting the Azure DevOps ServicePrincipalId Find the (either direct from the portal or "Manage Service Principal" from Azure DevOps) Get the ServicePrincipalId az ad sp show --id <appId> --query id