Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when run 'az ad app permission add' #10718

Closed
ghost opened this issue Oct 2, 2019 · 5 comments
Closed

Error when run 'az ad app permission add' #10718

ghost opened this issue Oct 2, 2019 · 5 comments
Assignees
Labels
Graph az ad Service Attention This issue is responsible by Azure service team.
Milestone

Comments

@ghost
Copy link

ghost commented Oct 2, 2019

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az ad app permission add

Errors:

not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
Temp\pip-install-6e754znd\knack\knack\cli.py, ln 206, in invoke
azure\cli\core\commands\__init__.py, ln 603, in execute
azure\cli\core\commands\__init__.py, ln 661, in _run_jobs_serially
azure\cli\core\commands\__init__.py, ln 652, in _run_job
azure\cli\command_modules\role\commands.py, ln 69, in graph_err_handler
azure\cli\core\commands\__init__.py, ln 631, in _run_job
azure\cli\core\commands\__init__.py, ln 306, in __call__
azure-cli-core\azure\cli\core\__init__.py, ln 485, in default_command_handler
azure\cli\command_modules\role\custom.py, ln 857, in add_permission
ValueError: not enough values to unpack (expected 2, got 1)

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az ad app permission add --id {} --api {} --api-permissions {}

Expected Behavior

Environment Summary

Windows-10-10.0.18362-SP0
Python 3.6.6
Shell: cmd.exe

azure-cli 2.0.74

Additional Context

@maggiepint maggiepint added customer-reported Issues that are reported by GitHub users external to the Azure organization. Graph az ad Service Attention This issue is responsible by Azure service team. labels Oct 2, 2019
@triage-new-issues triage-new-issues bot removed the triage label Oct 2, 2019
@lokijota
Copy link

Having the same issue.

The command failed with an unexpected error. Here is the traceback:

not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
File "C:\Users\VSSADM1\AppData\Local\Temp\pip-install-p8t_6awn\knack\knack\cli.py", line 206, in invoke
File "C:\Users\VSSADM
1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands_init_.py", line 603, in execute
File "C:\Users\VSSADM1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands_init_.py", line 661, in _run_jobs_serially
File "C:\Users\VSSADM
1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands_init_.py", line 652, in run_job
File "C:\Users\VSSADM1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\role\commands.py", line 69, in graph_err_handler
File "C:\Users\VSSADM
1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands_init
.py", line 631, in run_job
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core\commands_init
.py", line 306, in call
File "C:\Users\VSSADM1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli-core\azure\cli\core_init_.py", line 485, in default_command_handler
File "C:\Users\VSSADM
1\AppData\Local\Temp\pip-install-p8t_6awn\azure-cli\azure\cli\command_modules\role\custom.py", line 857, in add_permission
ValueError: not enough values to unpack (expected 2, got 1)

And:

az --version
azure-cli 2.0.75

@haroldrandom haroldrandom added customer-reported Issues that are reported by GitHub users external to the Azure organization. Graph az ad Service Attention This issue is responsible by Azure service team. labels Oct 25, 2019
@rventuri76
Copy link

rventuri76 commented Nov 19, 2019

same issue here

The command failed with an unexpected error. Here is the traceback:
not enough values to unpack (expected 2, got 1) Traceback (most recent call last): File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\knack\knack\cli.py", line 206, in invoke File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\commands\__init__.py", line 603, in execute File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\commands\__init__.py", line 661, in _run_jobs_serially File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\commands\__init__.py", line 652, in _run_job File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli\azure\cli\command_modules\role\commands.py", line 69, in graph_err_handler File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\commands\__init__.py", line 631, in _run_job File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\commands\__init__.py", line 306, in __call__ File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli-core\azure\cli\core\__init__.py", line 485, in default_command_handler File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-umfcm_n2\azure-cli\azure\cli\command_modules\role\custom.py", line 857, in add_permission ValueError: not enough values to unpack (expected 2, got 1)

@jiasli
Copy link
Member

jiasli commented Jan 14, 2020

Could you please share the command your are using without the GUIDs?

@jiasli jiasli self-assigned this Jan 14, 2020
@lambohamp
Copy link

You need to add =Scope or =Role at the end of --api-permissions, e.g.
az ad app permission add --id 00000000-1111-2222-3333-444444444444 --api 00000003-0000-0000-c000-000000000000 --api-permissions e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope

@yonzhan yonzhan added this to the S165 milestone Jan 24, 2020
@yonzhan yonzhan modified the milestones: S165, S166 Feb 2, 2020
@yonzhan yonzhan removed the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Feb 2, 2020
@yonzhan yonzhan modified the milestones: S166, S167 Mar 7, 2020
@yonzhan yonzhan modified the milestones: S167, S169 Mar 21, 2020
@jiasli jiasli modified the milestones: S169 - For Build, S170 May 11, 2020
@yonzhan yonzhan modified the milestones: S170, S171 May 31, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented May 31, 2020

@Juyama was your issue resolved by above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph az ad Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

7 participants