Azure / Azure/azure-cli

Track 1 Azure Python SDK support has been dropped in Azure CLI 2.70.0

Open
#30,951 3 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad Core Security-Issue Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

In response to an urgent security request, Track 1 Azure Python SDK support has been dropped in Azure CLI 2.70.0 (https://github.com/Azure/azure-cli/pull/29631).

Extensions that still rely on Track 1 SDKs will encounter failure when creating a credential with `Profile.get_login_credentials()`:

```
TypeError: Profile.get_login_credentials() got an unexpected keyword argument 'resource'
```

### Solution (for extension owners)

Please take below steps to adapt to this change:

1. Migrate all underlying Azure Python SDKs to Track 2.
2. Instead of passing `resource` to `Profile.get_login_credentials()`, pass `scopes` to the client factory as `credential_scopes`. https://github.com/Azure/azure-cli/pull/29631 contains some examples of this migration.

### Workaround (for users)

Please use Azure CLI 2.69.0 or below, or the [LTS version 2.66](https://learn.microsoft.com/en-us/cli/azure/azure-cli-support-lifecycle#long-term-support-releases-lts) before the extension is migrated to Track 2 Azure Python SDKs.

If you have any questions, please comment under this issue.

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.