Repository navigation
az ml command not working as expected after 08/23/2025 - ERROR: 'ml' is misspelled or not recognized by the system #32014
Description
Activity
- addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Aug 27, 2025 Thank you for opening this issue, we will look into it.
Reacted by DevOpsCraftsman28Here are some similar issues that might help you. Please check if they can solve your problem.
- Unable to install az ml extension on Azure CLI version 2.75.0 (Linux) #31744
- az ml ... command in Dev Ops does not install extension #18258
- ML Extension 2.30.0 responds with:
'ml' is misspelled or not recognized by the systemwhen triggered. #29940 - Azure ML CLI Extension Fails Due to FieldInstanceResolutionError from marshmallow.utils (ERROR: 'ml' is misspelled or not recognized by the system.) #31291
- az ml Broken on Installation #26295
Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)
Solution 1:
This issue is resolved with the latest release of az ml extension 2.37.2. Please install the latest ml extension:
az extension remove -n ml az extension add -n mlReference:
Solution 2:
Downgrade the Azure CLI to a version that is compatible with the
mlextension. For example, downgrading to Azure CLI version 2.70.0 has resolved similar issues:az --version azure-cli 2.70.0 * core 2.70.0 * telemetry 1.1.0 Extensions: azure-devops 0.18.0 ml 2.36.3Reference:
Solution 3:
Ensure that the
mlextension is installed correctly and matches the Azure CLI version. If the extension is already installed, try updating it to the latest version or reinstalling it:az extension add --name ml az extension update --name mlReference:
- ML Extension 2.30.0 responds with:
'ml' is misspelled or not recognized by the systemwhen triggered. #29940 (comment) - ML Extension 2.30.0 responds with:
'ml' is misspelled or not recognized by the systemwhen triggered. #29940 (comment)
Powered by issue-sentinel
- addedService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.
on Aug 27, 2025 microsoft-github-policy-service commented
on Aug 27, 2025 ContributorMore actionsThanks for the feedback! We are routing this to the appropriate team for follow-up. cc azureml-github.
Bug Analysis
Issue:
az mlcommands fail withERROR: 'ml' is misspelled or not recognized by the systemafter installing the ml extension, due to an underlying import error:cannot import name 'AzureOpenAIDeployment' from 'azure.ai.ml.entities' (/usr/local/miniconda/lib/python3.10/site-packages/azure/ai/ml/entities/__init__.py)Root cause: The
mlCLI extension v2.38.1 referencesAzureOpenAIDeploymentfromazure-ai-ml, but the environment hasazure-ai-ml==1.14.0which does not export that symbol. When the extension module fails to import, the CLI falls back to the "misspelled or not recognized" error message.Environment:
- Azure CLI: 2.76.0
- ml extension: 2.38.1
- azure-ai-ml: 1.14.0
- Python: 3.10.16 (Linux)
Steps to fix:
- Check the
mlextension's minimum version requirement forazure-ai-ml— ensure that requirement is declared correctly so the installer enforces it. - If the incompatibility is in the extension loading path, improve the error message in the
extensioncommand module to surface the underlyingImportErrorinstead of reporting "misspelled or not recognized". - Reproduce with
az extension add -n mlfollowed byaz ml online-endpoint createwith the pinnedazure-ai-ml==1.14.0to confirm.
PR title & description format (required)
This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.
Title
- Start with
[Extension]— square brackets[]for a customer-facing change (added toHISTORY.rst), curly{}if not. A bug fix is customer-facing, so use[]. - Then
Fix #32014:to link the issue (use the short#Nform, notowner/repo#N). - Then the affected command wrapped in backticks followed by a colon — e.g.
`az vm create`:.⚠️ The format check fails if theaz ...command in the title is not inside backticks. - Then a present-tense, capitalized verb (Fix for bug fixes; Add/Change/Deprecate/Remove otherwise) and a concise summary.
- Recommended title (note the backticks around the command):
[Extension] Fix #32014: `az <command>`: Fix <concise description of the fix>Description — follow the PR template and fill in:
- Link the issue — start the Description with a closing keyword so the PR auto-links and closes it:
Fixes #32014. - Related command — the
az ...command this affects. - Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
- Testing Guide — example command(s) showing the fix works.
- History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g.
[Extension] `az <command>`: <note>. - Keep the template checklist and tick the items you've satisfied.
Posted by agent-assist (autonomous bug-fix pipeline).
Describe the bug
Hi,
The original script as shown below:
In the ado pipeline log:
WARNING: Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
WARNING: Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
ERROR: 'ml' is misspelled or not recognized by the system.
Examples from AI knowledge base:
az extension add --name anextension
Add extension by name
az extension list-available
List all publicly available extensions
Everything was fine on the previous day 08/22/2025.
When I debug with
az extension add -n ml --system -y
az extension list
cannot import name 'AzureOpenAIDeployment' from 'azure.ai.ml.entities' (/usr/local/miniconda/lib/python3.10/site-packages/azure/ai/ml/entities/init.py)
[
{
"experimental": false,
"extensionType": "whl",
"name": "ml",
"path": "/usr/local/miniconda/lib/python3.10/site-packages/azure-cli-extensions/ml",
"preview": false,
"version": "2.38.1"
}
]
Notes: the python package version for azure-ai-ml is 1.14.0
Any suggestions I can try to resolve the issues with "az ml" command?
Thanks!
Related command
az ml
Errors
WARNING: Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
WARNING: Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
ERROR: 'ml' is misspelled or not recognized by the system.
Examples from AI knowledge base:
az extension add --name anextension
Add extension by name
az extension list-available
List all publicly available extensions
Issue script & Debug output
az ml
Expected behavior
it should execute the az ml command without any errors
Environment Summary
az/usr/local/miniconda/bin/az --version
azure-cli 2.76.0
core 2.76.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
ml 2.38.0
xsignextension 0.48
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/usr/local/miniconda/bin/python'
Config directory '/root/.azure'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response