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

Crash while granting admin-consent to AD Application #16005

Closed
afiune opened this issue Nov 20, 2020 · 2 comments
Closed

Crash while granting admin-consent to AD Application #16005

afiune opened this issue Nov 20, 2020 · 2 comments

Comments

@afiune
Copy link

afiune commented Nov 20, 2020

Describe the bug

Command Name
az ad app permission admin-consent

Errors:

'Response' object has no attribute 'status'
Traceback (most recent call last):
azure/cli/core/adal_authentication.py, ln 103, in set_token
    super(MSIAuthenticationWrapper, self).set_token()
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 598, in set_token
    self.scheme, _, self.token = get_msi_token(self.resource, self.port, self.msi_conf)
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

...

azure/cli/core/adal_authentication.py, ln 114, in set_token
    .format(err.response.status, err.response.reason))
AttributeError: 'Response' object has no attribute 'status'

To Reproduce:

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

  • Create an AD application and try to grant admin consent with the command above
  • az ad app permission admin-consent --id {}

Expected Behavior

Grant admin consent privileges to the new AD Applicatoin

Environment Summary

This was run via the Azure Cluod Shell

Linux-4.15.0-1098-azure-x86_64-with-debian-stretch-sid (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.14.0 *

Extensions:
ai-examples 0.2.4

Additional Context

I built the URL to follow and grant the admin consent and when following it it grants the consent but also displays this error message:
image

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 20, 2020
@yonzhan yonzhan added the Graph az ad label Nov 21, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 21, 2020
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Nov 21, 2020
@yonzhan yonzhan added this to the S180 milestone Nov 21, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 21, 2020

az ad

@yonzhan yonzhan modified the milestones: S180, S181 Dec 5, 2020
@yonzhan yonzhan modified the milestones: S181, S182 Dec 31, 2020
@yonzhan yonzhan modified the milestones: S182, S183 Feb 6, 2021
@yonzhan yonzhan modified the milestones: S183 - For Ignite, S184 Feb 26, 2021
@yonzhan yonzhan modified the milestones: S184, S185 Mar 14, 2021
@yonzhan yonzhan modified the milestones: S185, S186 Apr 6, 2021
@yonzhan yonzhan modified the milestones: S186, S187 Apr 23, 2021
@yonzhan yonzhan modified the milestones: S187, S188 May 9, 2021
@yonzhan yonzhan modified the milestones: S188, S189 Jun 12, 2021
@yonzhan yonzhan modified the milestones: S189, Jul 2021 (2021-08-03) Jul 2, 2021
@jiasli
Copy link
Member

jiasli commented Jul 8, 2021

Please see #12137 (comment) for detailed explanation and workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants