Skip to content

Azure CLI 2.89.1 installed by az upgrade is blocked by Azure Local WDAC policy #33919

Description

Describe the bug

On an Azure Local cluster node, az upgrade --yes offers and installs Azure CLI 2.89.1 using the official Microsoft MSI.

Before the upgrade, Azure CLI 2.85.0 works normally on the node.

After the MSI upgrade completes, Azure CLI can no longer be started because the bundled:

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe

is blocked by the Azure Local node's enforced Device Guard / WDAC policy.

Windows Code Integrity logs Event IDs 3033 and 3077 stating that the new python.exe does not meet the Enterprise signing level requirements / violates the active code integrity policy.

Rolling Azure CLI back from 2.89.1 to the Microsoft-signed 2.85.0 MSI immediately restores Azure CLI functionality without making any WDAC policy changes.

Environment before upgrade:

  • Azure Local cluster node
  • Azure CLI: 2.85.0
  • stack-hci-vm extension: 1.15.0
  • Azure CLI installation: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\
  • Azure Local CLI extensions: C:\CloudContent\AzCliExtensions\

Reproduction:

  1. Verify Azure CLI 2.85.0 works with az version.
  2. Run az upgrade.
  3. Azure CLI reports that 2.89.1 is the latest available version.
  4. Run az upgrade --yes.
  5. The official Microsoft Azure CLI 2.89.1 MSI is downloaded and installed.
  6. After installation, run az version.
  7. Device Guard / WDAC blocks the bundled python.exe and Azure CLI is unusable.

Expected behavior:

az upgrade should not offer and install an Azure CLI version that cannot execute under the enforced WDAC policy of an Azure Local node.

Either:

  • Azure CLI 2.89.1 should meet the signing requirements of the Azure Local WDAC policy, or
  • az upgrade should detect this environment and refuse/avoid an incompatible upgrade, or
  • Azure Local tooling/documentation should clearly state that the node-local Azure CLI must only be updated through Azure Local servicing.

Actual behavior:

The Microsoft-provided self-upgrade successfully installs Azure CLI 2.89.1, but the resulting Azure CLI is unusable because its bundled python.exe is blocked by WDAC.

Rollback test:

Azure CLI 2.89.1 was uninstalled and the Microsoft-signed Azure CLI 2.85.0 MSI was reinstalled. az version worked again immediately with no WDAC policy changes.

Other Azure Local nodes were intentionally not upgraded after reproducing the problem on the first node.

Related command

az upgrade

az upgrade --yes

az version

Errors

After upgrading from Azure CLI 2.85.0 to 2.89.1:

'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' was blocked by your organization's Device Guard policy.

Contact your support person for more info.

Windows Code Integrity Event ID 3077:

Code Integrity determined that a process
(\Device\HarddiskVolume4\Windows\System32\cmd.exe)
attempted to load
\Device\HarddiskVolume4\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe
that did not meet the Enterprise signing level requirements or violated code integrity policy.

Windows Code Integrity Event ID 3033:

Code Integrity determined that a process
(\Device\HarddiskVolume4\Windows\System32\cmd.exe)
attempted to load
\Device\HarddiskVolume4\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe
that did not meet the Enterprise signing level requirements.

The same node works again immediately after rolling Azure CLI back to 2.85.0.

Issue script & Debug output

Reproduction script:

# Azure CLI 2.85.0 is working at this point
az version

# Check whether an upgrade is available
az upgrade

# Perform the upgrade offered by Azure CLI itself
az upgrade --yes

# After the MSI installation has completed
az version

### Expected behavior

`az upgrade` should not offer and install an Azure CLI version that cannot execute under the enforced WDAC / Device Guard policy of an Azure Local node.

Either Azure CLI 2.89.1 and its bundled `python.exe` should meet the signing requirements of the Azure Local WDAC policy, or `az upgrade` should detect this environment and avoid installing an incompatible version.

The upgrade must not leave a previously working Azure CLI installation unusable.

### Environment Summary

Azure Local cluster node

Before upgrade:
azure-cli: 2.85.0
azure-cli-core: 2.85.0
azure-cli-telemetry: 1.1.0

Extensions:
arcappliance: 1.7.2
customlocation: 0.1.4
k8s-extension: 1.7.0
resource-graph: 2.1.1
stack-hci-vm: 1.15.0

Azure CLI installation path:
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\

Azure Local extensions path:
C:\CloudContent\AzCliExtensions\

Target version offered by `az upgrade`:
Azure CLI 2.89.1

After upgrade:
`az version` fails because
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe
is blocked by the enforced Device Guard / WDAC policy.

Rollback to Azure CLI 2.85.0 restores functionality immediately without any WDAC policy changes.

### Additional context

The issue was reproduced on one Azure Local node only. The remaining cluster nodes were intentionally not upgraded after the failure was observed.

Windows Code Integrity logged Event IDs 3033 and 3077 for the upgraded Azure CLI 2.89.1 bundled python.exe.

No WDAC / Device Guard policy changes were made.

After uninstalling Azure CLI 2.89.1 and reinstalling the Microsoft-signed Azure CLI 2.85.0 MSI, `az version` worked again immediately under the unchanged policy.

This makes the issue especially risky on Azure Local because `az upgrade` explicitly offers 2.89.1 as the latest version and completes the MSI installation before the resulting CLI becomes unusable.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamUpgradeaz upgradeact-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions