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 account get-access-token fails in Azure Cloud Shell #3641
Comments
The |
Removing the milestone flag... The fix was merged into xplat and will be included in its upcoming release. At that time, cloud console will just integrate it |
@yugangw-msft can you please clarify your answer. Why it is not supported in azure portal shell? if you'll fix it in adal-python (not sure what it is) - how can I use it in Azure Cloud Shell? My use case - I'd like to get access token to run REST API calls to Application Insights data. |
@SergeyKanzhelev, the fix was made in CLI 1.0(aka xplat), not in the adal-python which CLI depends on. I have corrected my old comment. |
So can you make cloud console generate the token, so one can use it to |
I don't think cloud console ever exposes the token endpoint. CLI team doesn't own the console. Maybe you can open a separate issue with the details for why you need this. In the context of CLI, |
Can someone please explain why this doesn't work???? |
@andrewb-ms it is working for me now. You can use it like this: http://apmtips.com/blog/2017/09/19/query-multiple-applications/ |
This doesn't work for me: PS Azure:> az account get-access-token It works in Bash but not PowerShell. Seems pretty broken... |
@andrewb-ms, from the output you provided, the CLI integrated in the PowerShell is couple of versions older than the counter part in the Bash, hence you have missed out a few recent improvements, particularly the piece handling when the credential provided by console might not have id-tokens. |
@HemantMahawar as FYI, I believe they prefer tracking here: https://github.com/PowerShell/PSCloudConsole/issues |
And 7 months later, the problem still happens: Great work guys. |
Description
Outline the issue here:
Install the newer version of the az CLI client in the Azure cloud shell (the usual curl | bash install) and put it in the path. Try running:
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: curl | bash
CLI Version: What version of the CLI and modules are installed? (Use
az --version
)Answer here:
az --version
azure-cli (2.0.7)
acr (2.0.5)
acs (2.0.7)
appservice (0.1.7)
batch (3.0.0)
billing (0.1.0)
cdn (0.0.3)
cloud (2.0.3)
cognitiveservices (0.1.3)
command-modules-nspkg (2.0.0)
component (2.0.5)
configure (2.0.7)
consumption (0.1.0)
core (2.0.7)
cosmosdb (0.1.7)
dla (0.0.7)
dls (0.0.7)
feedback (2.0.3)
find (0.2.3)
interactive (0.3.3)
iot (0.1.6)
keyvault (2.0.5)
lab (0.0.5)
monitor (0.0.5)
network (2.0.7)
nspkg (3.0.0)
profile (2.0.5)
rdbms (0.0.2)
redis (0.2.4)
resource (2.0.7)
role (2.0.5)
sf (1.0.2)
sql (2.0.4)
storage (2.0.7)
vm (2.0.7)
Python (Linux) 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]
Python location '/home/uros/lib/azure-cli/bin/python'
OS Version: What OS and version are you using?
Answer here:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here:
bash
The text was updated successfully, but these errors were encountered: