Open pamelafox opened 1 year ago
The warning in the console gives a command that doesn't work without additional arguments.
Command Name az ad app permission add
az ad app permission add
Errors:
The output says: "Invoking az ad app permission grant --id {}--api 00000003-0000-0000-c000-000000000000 is needed to make the change effective"
az ad app permission grant --id {}--api 00000003-0000-0000-c000-000000000000
However, if you run that, you'll get an error due to missing argument:
$ az ad app permission grant --id $client_id \ --api 00000003-0000-0000-c000-000000000000 the following arguments are required: --scope
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az ad app permission add --id {} --api {} --api-permissions {}
I expect it to give me a working command or at least to mention scope is needed.
Linux-5.15.49-linuxkit-x86_64-with-glibc2.31, Debian GNU/Linux 11 (bullseye) Python 3.10.10 Installer: DEB azure-cli 2.46.0 Extensions: account 0.2.5 Dependencies: msal 1.20.0 azure-mgmt-resource 21.1.0b1
The line of code generating the warning is https://github.com/Azure/azure-cli/blob/36786c51a5d42ff1b0a197e72a2c12261ff6743b/src/azure-cli/azure/cli/command_modules/role/custom.py#L908
It also could use a mention to az ad sp create --id $client_id which the reference does mention. Another approach is to just link to the reference.
az ad sp create --id $client_id
@jiasli for awareness
Describe the bug
The warning in the console gives a command that doesn't work without additional arguments.
Command Name
az ad app permission add
Errors:
The output says: "Invoking
az ad app permission grant --id {}--api 00000003-0000-0000-c000-000000000000
is needed to make the change effective"However, if you run that, you'll get an error due to missing argument:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az ad app permission add --id {} --api {} --api-permissions {}
Expected Behavior
I expect it to give me a working command or at least to mention scope is needed.
Environment Summary
Additional Context
The line of code generating the warning is https://github.com/Azure/azure-cli/blob/36786c51a5d42ff1b0a197e72a2c12261ff6743b/src/azure-cli/azure/cli/command_modules/role/custom.py#L908