Hi Johan Öberg
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Verify that the Automation Account has the necessary permissions at the resource group level in which it operates, with a minimum of the Contributor role assigned.
Verify that the Automation Account possesses the required permissions for the specific resources it manages, such as virtual machines and storage accounts.
Create a simple runbook that retrieves information about a virtual machine. If this runbook runs successfully, it means the problem might be with a specific runbook or its setup.
For reference, please review this documentation :-
https://learn.microsoft.com/en-us/azure/automation/troubleshoot/runbooks
https://learn.microsoft.com/en-us/azure/automation/troubleshoot/managed-identity
If you have any further queries, do let us know.
If the answer is helpful, please and "Upvote it".