An Azure service that is used to automate, configure, and install updates across hybrid environments.
Thanks for posting your question in the Microsoft Q&A forum.
Ensure that your Azure Automation account or VM is properly configured with a Managed Identity.
The MSI endpoint 169.254.169.254 is only accessible from within Azure. If you are running this command from outside Azure, it won’t be able to reach this endpoint. if you are running the CLI from a local environment or outside Azure, you won't be able to use the --identity parameter.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful