question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az ad app permission admin-consent --id $serverApplicationId Error

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az ad app permission admin-consent

Errors:

400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token
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)
...
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 486, in get_msi_token
    result.raise_for_status()
python3.6/site-packages/requests/models.py, ln 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token

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 admin-consent --id {}

Expected Behavior

Environment Summary

Linux-4.15.0-1083-azure-x86_64-with-debian-stretch-sid
Python 3.6.10
Installer: DEB

azure-cli 2.7.0

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yungezzcommented, Jun 11, 2020

hi @yoshuhire Did you see the error at Cloudshell?

0reactions
arrownjcommented, Aug 18, 2020

Close this issue first, the cloud shell issue will be tracked in #11749 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

az ad app permission admin-consent --id <app-id> fails in ...
Describe the bug Issuing the command az ad app permission admin-consent --id fails with msrestazure.azure_active_directory : MSI: Failed to ...
Read more >
Unexpected error when performing consent to an application
This error can occur when a Global Administrator turns off the ability for users to consent to applications, then a non-administrator user ...
Read more >
Integration between Citrix Gateway and Microsoft Endpoint ...
Integration between Citrix Gateway and Microsoft Endpoint Management fails because OAuth status fails to move on from status GRAPH to status COMPLETE.
Read more >
Azure CLI SP creation w API permissions | Edureka Community
The solution is to get the SP's Object ID and the Microsoft Graph API's Object ID first, then utilise az rest to directly...
Read more >
Add Graph API via az ad app permission fails - Stack Overflow
A workaround is to use az ad app permission admin-consent --id $appid instead of az ad app permission grant . See reference here....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found