Ensure that Azure Automation accounts have managed identity enabled.
Enabling managed identities eliminate the need for developers having to manage credentials by providing an identity for the Azure resource in Azure AD and using it to obtain Azure Entra ID tokens.
Modify automation account and enable managed identity.