Solution skill
Azure CLI 2.51.0 (August 01, 2023) introduces Python UserWarning of cryptography for extensions
Complete solution
Fixes the cryptography UserWarning on Azure CLI 2.51.0 ('You are using cryptography on a 32-bit Python on a 64-bit Windows OS') by migrating to the 64-bit Azure CLI. Use when Azure Pipelines fails with PowerShell RemoteException from the arcappliance extension warning. Not for other Python warnings or 64-bit installs.
TL;DR
The warning means the 32-bit Azure CLI is running on 64-bit Windows. Fix: migrate to the 64-bit Azure CLI (see the install docs section 'Migrate to 64-bit Azure CLI'). GitHub-hosted runner images now ship 64-bit by default, so updating the runner image also resolves it.
The error
UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.In Azure Pipelines this surfaces as a PowerShell RemoteException that fails the pipeline, typically when using the arcappliance extension.
Fix it
Confirm you are on the 32-bit CLI:
az versionSuccess check: the installed CLI is 2.51.0 (or nearby) and the warning mentions 32-bit Python.
Migrate to the 64-bit Azure CLI per the install docs ('Migrate to 64-bit Azure CLI'). Success check: reinstall completes;
az versionno longer triggers the warning.If you run on GitHub-hosted agents, update to a current runner image, which ships 64-bit by default. Success check: the pipeline step passes with no RemoteException.
As a short-term workaround, pin Azure CLI to 2.50.0 where the warning does not appear. Success check: pipeline goes green, but treat this as temporary.
When this applies
- Azure CLI 2.51.0 on 64-bit Windows emitting the cryptography 32-bit UserWarning.
- Azure Pipelines failing with PowerShell RemoteException tied to the warning (arcappliance extension).
When it does not apply
- You are already on the 64-bit CLI and still see warnings; the cause is different.
- Non-Windows agents, or warnings from a different Python package.
- Cryptography is genuinely slow for workload reasons rather than the 32-bit build.
Compatibility
- Azure CLI 2.51.0 (August 2023) 32-bit Windows build. Fixed by migrating to 64-bit.
- GitHub-hosted runners: current images ship 64-bit.
Variant phrasings
- Azure CLI 2.51.0 cryptography UserWarning 32-bit Python
- arcappliance extension RemoteException Azure Pipelines
- "You are using cryptography on a 32-bit Python on a 64-bit Windows"
Why it happens
Azure CLI 2.51.0 shipped a 32-bit Python runtime on 64-bit Windows. The cryptography package detects the mismatch and warns; in PowerShell remoting contexts the warning becomes a RemoteException that fails the pipeline. The 64-bit CLI build removes the mismatch entirely.
Edge cases
- Self-hosted agents need the manual 64-bit migration; only GitHub-hosted images updated automatically.
- Extensions other than arcappliance can trigger the same warning; the fix is identical.
- Source: https://github.com/Azure/azure-cli/issues/27115
Evidence
Issue gh:Azure/azure-cli#27115: the reporter asked: Issue Azure/azure-cli#27115 (closed, 34 comments): ### Describe the bug When Azure CLI 2.51.0 (August 01, 2023) is installed, arcappliance extension produces a Python UserWarning: > You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python. This leads to PowerShell RemoteException which fails Azure Pipelines. We have tried to uninstall 2.51.0 and install 2.50.0, and the error disappears. ### Related command ``` # az extension add --name arcappliance az arcappliance validate hci --config-file $configFilePath --only-show-errors # A no The verified answer was: The cryptography UserWarning on Azure CLI 2.51.0: the CLI was running 32-bit Python on 64-bit Windows on Microsoft-hosted agents. Migrate to the 64-bit Azure CLI (see the install docs section 'Migrate to 64-bit Azure CLI'); GitHub runner images now ship 64-bit by default. Evidence thread: https://github.com/Azure/azure-cli/issues/27115
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_exylijJmm5cp-Yho6hx9KA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure CLI 2.51.0 (August 01, 2023) introduces Python UserWarning of cryptography for extensions <span>— Vectle</span></a>