Export RunAsAccount Certificate

Mohamed jihad bayali 1,101 Reputation points
2022-11-23T16:15:17.593+00:00

Hello,

I'm using a powershell Runbook on an Azure VM via Azure Automation Account.

My VM is added to a hybrid worker group.

Recently i renewed my self signed certificate on the Azure Automation Account, now i'm receiving this error when launching my Runbook :

263535-image.png

I want to know how can i export the self signed certificate from the RunAsAccount and import it to my VM?
Or, i generated a new self signed certificate from the VM, and i want to import it to the run AsAccount, how can i do it?

Thank you

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,111 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 19,686 Reputation points
    2022-11-29T16:13:58.897+00:00

    @Mohamed jihad bayali , I understand that you have renewed the certificate as used in Azure Automation --> "Run as accounts".
    You can use the steps mentioned in this article to install certificate on Hybrid runbook worker. This script is to be run as "Azure Automation Runbook" from "Azure Automation Account".

    You can also use the steps as mentioned in the article below, to export certificate to a storage account and download it locally on your machine.
    https://learn.microsoft.com/en-us/answers/questions/126252/azure-automation-account-certificate.html

    Please note that support for Azure Automation Run As Account will retire on September 30, 2023 and will be replaced with Managed Identities. Before that date, you'll need to start migrating your runbooks to use managed identities. For more information, see migrating from an existing Run As accounts to managed identity to start migrating the runbooks from Run As account to managed identities before 30 September 2023.

    Hope this helps. Please let me know if you have any questions. If I have misunderstood the question, please share additional details/context to help me better understand it.