Azure / Azure/azure-cli

Upgrade prompt is interactive and blocks automation workflows

Open
#17,886 10 comments 1 reaction 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad act-platform-engineering-squad common issue feature-request Graph OKR3.2 Candidate Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug
Users or agents with an older version of the `az` CLI can get into a blocking situation when executing a command as it follows-up with an upgrade prompt for the CLI

**Command Name**
`az ad sp create-for-rbac`

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

- get a machine with a non-current version of the `az` CLI
- `az ad sp create-for-rbac --name {} --role {} --scopes {} --sdk-auth`

## Expected Behavior
Command executes and finished with no blocking interactivity

## Actual Behavior
Command executes, but finishes with an offer to upgrade to the latest CLI, thus blocking anything that is expecting either an error state or a final exit code

## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.22.1

```
## 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.