@Anonymous ,
Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.
With the error shared, I feel your azure automation account is running on a system-assigned identity. Did you create the managed identity for the Azure Automation Account? If yes, after generating the object id, you can add the object id to the key vault. The below article might assist you with the how-to-use Azure Automation Account to access the key vault.
https://www.netspi.com/blog/technical/cloud-penetration-testing/azure-automation-accounts-key-stores/
If the above solution doesn't work, please share more details about the problem so that I can help you.
----------
Please "Accept as Answer" and Upvote if any of the above helped so that, it can help others in the community looking for remediation for similar issues.