Azure / Azure/azure-devops-cli-extension

az devops (bash) with Cloud Shell does not seem to support using the session az login, or existing session on cloud shell for az devops context

Open
#1,213 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

Described temporary fix [here](https://github.com/jsa2/azdevops-cert#running-in-cloud-shell)

**Command Name**
`az devops project show
Extension Name: azure-devops. Version: 0.20.0.`

**Errors:**
```
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

```

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

In cloud shell try the following

```bash
subName="Your Sub"
az account set --subscription "$subName"
DevopsProject=yourProj
DevopsOrg=yourOrg
az devops configure --defaults organization=https://dev.azure.com/$DevopsOrg
# Before continuing, ensure az devops project list command works (This will confirm, that you are logged in)
az devops project show -p $DevopsProject
```

- _Put any pre-requisite steps here..._
- `az devops project show -p {}`

## Expected Behavior

With AZ CLI (locally installed) any az devops command can use the existing session

## Environment Summary
```
Linux-5.4.0-1061-azure-x86_64-with-debian-10.2 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.6.10
Installer: DEB

azure-cli 2.28.0 *

Extensions:
azure-devops 0.20.0
ai-examples 0.2.5
ssh 0.1.6

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.