Repository navigation
"az resource ls" throws errors on macOS #34237
Copy link
Copy link
Open
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
az resource threw a bunch of errors. Even if "ls" isn't a valid option, it shouldn't be doing this and it makes me worry about using this at all.
Command Name
az resource ls
Errors:
❯ az resource ls
/opt/homebrew/Caskroom/azure-cli/2.91.0/libexec/lib/python3.14/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: "\ " is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\ "? A raw string is also an option.
"""The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
/opt/homebrew/Caskroom/azure-cli/2.91.0/libexec/lib/python3.14/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: "\ " is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\ "? A raw string is also an option.
using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / are
/opt/homebrew/Caskroom/azure-cli/2.91.0/libexec/lib/python3.14/site-packages/azure/mgmt/resource/deploymentstacks/models/_models.py:119: SyntaxWarning: "\/" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\/"? A raw string is also an option.
following actions are automatically appended to 'excludedActions': '*\/read' and
'ls' is misspelled or not recognized by the system.
https://aka.ms/cli_ref
Read more about the command in reference docs
~ on ☁️ (eu-west-2) took 7s
To Reproduce:
Steps to reproduce the behavior.
az resource ls
Expected Behavior
Environment Summary
macOS-27.0.1-arm64-arm-64bit-Mach-O
Python 3.14.8
Installer: HOMEBREW_CASK
azure-cli 2.91.0
Additional Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Activity
yonzhan commentedon Oct 19, 2026
Thank you for opening this issue, we will look into it.
microsoft-github-policy-service commentedon Oct 19, 2026
🔔 Routing this issue to @Azure/act-identity-squad.
x-engineering-agent commentedon Oct 19, 2026
Triage finding
az resource lsis not a registered Azure CLI command. The resource command table registersaz resource list, so the finalls is misspelled or not recognizedmessage is the invalid-command error. Useaz resource listto list resources.The preceding
SyntaxWarningmessages are separate from that error: the paths in the output point to installedazure.batchandazure.mgmt.resource.deploymentstacksSDK model files, and the warnings identify invalid escape sequences under Python 3.14. They do not indicate that a resource operation was attempted or failed. The actionable cleanup is in those SDK dependencies' Python 3.14 compatibility, not anaz resource lsimplementation. There is no evidence here of an Azure resource command failure with the supportedlistsubcommand.Posted by x-engineering-agent (Fixer)
x-engineering-agent commentedon Oct 19, 2026
The resource command is
az resource list, notaz resource ls; the latter's “'ls' is misspelled or not recognized” error is expected. The resource command registration defineslistbut notls.The preceding
SyntaxWarninglines are separate: their paths point to installedazure.batchandazure.mgmt.resource.deploymentstacksSDK model files being parsed by Python 3.14, not to a failed resource operation. Please useaz resource listfor the intended command. The SDK warnings are still worth tracking independently for Python 3.14 compatibility; if they also appear with a valid CLI command, a separate issue with the warning paths and your CLI/Python versions would let maintainers investigate them without conflating them with the expected unknown-command error.Posted by x-engineering-agent (Fixer)
isra-fel commentedon Oct 20, 2026
Reproduced on 2.91.0 but gives a meaningful error on 2.89.0. Might be a regression in between.
microsoft-github-policy-service commentedon Oct 20, 2026
🔔 Routing this issue to @Azure/act-quality-productivity-squad.