Azure Runbook not found error after Automation Account restore

Adem 0 Reputation points
2026-07-10T11:44:59.3033333+00:00

I've restored an automation account but I get an error "ressource not found" when I want to open the runbook.
symptoms:

  • Runbook visible in ARM
  • Runbook runs fine
  • Portal returns 404
  • Content endpoint returns 404
  • Export-AzAutomationRunbook fails

How can I restore the runbook ?

I don't have a backup of it so it's very critical.

Thank you for your help,

Regards,

Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.


2 answers

Sort by: Most helpful
  1. Adem 0 Reputation points
    2026-07-10T11:56:24.4+00:00

    View source snapshot is empty

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-07-10T11:45:30.21+00:00

    The runbook code can be recovered even if the portal and content endpoints return 404, as long as there are past jobs for that runbook.

    Use the job’s source snapshot to restore it:

    1. In the Azure portal, go to the affected Automation Account.
    2. Open Jobs (Runbook Jobs) and locate a previous successful job for the problematic runbook.
    3. Open that job and select View source snapshot.
    4. Copy the full script shown in the snapshot.
    5. Create a new runbook in the same Automation Account (or edit the existing broken one if the editor opens) and paste the copied script.
    6. Save and publish the new/updated runbook.

    This recreates the runbook content from the last executed version, which is the only option when there is no separate backup.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.