Migrate existing Run as Account runbooks to Managed Identity

JovsP 166 Reputation points
2023-09-12T01:36:34.64+00:00

Hi,

I'd like to ask some reference on about migrating existing Run as Account runbooks to Managed Identity using PowerShell code?

Thanks,

Jovsp

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

1 answer

Sort by: Most helpful
  1. Luke Murray 11,351 Reputation points MVP
    2023-09-12T02:36:08.55+00:00

    Hey, theres some good reference material here:

    Under Sample scripts.

    I use a Managed Identity in most of my own Runbooks:

      $AzureContext = (Connect-AzAccount -Identity).context
    
    
    

    Feel free to reference the code used to build a base:


Your answer

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