When running the following command:
az ad sp show --id http://$SP_NAME
I will always get an error (below) if $SP_NAME is the service principal display name, and not its ID.
Service principal ... doesn't exist
The $SP_NAME variable contains the exact same display name as I see in the App Registrations in Azure AD.
When deploying a service principal via script, we do not have the service principal object ID prior to running the script, only the name we want to assign to the service principal (display name). Not only this used to work a few months back, as per the documentation it should still work!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
When running the following command:
I will always get an error (below) if $SP_NAME is the service principal display name, and not its ID.
The $SP_NAME variable contains the exact same display name as I see in the App Registrations in Azure AD.
When deploying a service principal via script, we do not have the service principal object ID prior to running the script, only the name we want to assign to the service principal (display name). Not only this used to work a few months back, as per the documentation it should still work!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.