Newer Az PowerShell module versions (newer than v11) may fail to load in Azure Automation PowerShell runbooks on older runtime versions like 7.2. Switch to the Runtime Environment Experience, create a new Runtime Environment, select a new PowerShell version like 7.4 or 7.6 for the environment, and migrate your runbooks to the new environment.