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

az ad app permission add fails #15598

Closed
aflinchb opened this issue Oct 21, 2020 · 1 comment
Closed

az ad app permission add fails #15598

aflinchb opened this issue Oct 21, 2020 · 1 comment
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team.

Comments

@aflinchb
Copy link

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):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 709, in _run_job
    cmd_copy.exception_handler(ex)
...
cli/core/commands/__init__.py, ln 325, in __call__
    return self.handler(*args, **kwargs)
azure/cli/core/__init__.py, ln 784, in default_command_handler
    return op(**command_args)
cli/command_modules/role/custom.py, ln 924, in add_permission
    access_id, access_type = e.split('=')
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.

  • Create App Registration
  • Run az ad app permission add with the following parameters
  • --id = appId of App Registration to be given the Microsoft Graph API permissions
  • --api = RequiredResourceAccess.resourceAppId of Microsoft Graph API (00000003-0000-0000-c000-000000000000)
  • --api-permission = ResourceAccess.id of permission Application.ReadWrite.All (bdfbf15f-ee85-4955-8675-146e8e5296b5)

Expected Behavior

I expected the command to work successfully and add the API permission to the App Registration.

Actual Behavior

Nothing was added and the error above was output, which did not helpfully describe what the issue was.

Environment Summary

Linux-4.19.128-microsoft-standard-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.13.0

Extensions:
application-insights 0.1.6

Additional Context

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Oct 21, 2020
@aflinchb
Copy link
Author

Closing as I believe I was mis-using this cli call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team.
Projects
None yet
Development

No branches or pull requests

1 participant