Describe the bug
The az ad sp show command errors with exit code 1 when no service principal exists with the given --id. #6612 suggests that all CLI commands should error with exist code 3 when the target resource is missing.
To Reproduce
Attempt to show a service principal that does not exist and observe that the exit code is 1:
$ az ad sp show --id blah
service principal 'blah' doesn't exist
$ echo $?
1
Expected behavior
Attempt to show a service principal that does not exist and observe that the exit code is 3:
$ az ad sp show --id blah
service principal 'blah' doesn't exist
$ echo $?
3
Environment summary
$ az --version
azure-cli 2.0.78
command-modules-nspkg 2.0.3
core 2.0.78
nspkg 3.0.4
telemetry 1.0.4
Extensions:
azure-devops 0.16.0
Describe the bug
The
az ad sp showcommand errors with exit code 1 when no service principal exists with the given--id. #6612 suggests that all CLI commands should error with exist code 3 when the target resource is missing.To Reproduce
Attempt to show a service principal that does not exist and observe that the exit code is 1:
Expected behavior
Attempt to show a service principal that does not exist and observe that the exit code is 3:
Environment summary