How to grant Azure Managed Identity access to local file system inside VM?

cb1979 0 Reputation points
2023-06-28T18:00:40.0233333+00:00

I'm scrambling to try setting up Azure Automation to use managed identities since Microsoft effectively disabled my run as account well ahead of the retirement date by disabling the renewal of certificates.

I'm trying to run Powershell scripts within a VM and need to grant the managed identity priliveges on the local file system, but all of the documentation for managed identities focuses on granting access to Azure services.

I'm assuming I'll need to grant permissions (Modify, Read & execute/ etc.) to specific folders in the Windows file system to some AD account, but I can't find any walkthroughs how this all works.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,956 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,358 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luke Murray 11,436 Reputation points MVP Volunteer Moderator
    2023-06-28T22:08:41.68+00:00

    Hi,

    You can't, you can get the token for the VM inside the VM and use that to authenticate and work with Azure services, but you can't use a Managed Identity to install applications on virtual machines; for that, you will need to leverage a local account.

    If you use the Hybrid worker, in Azure Automation, it will run under a System account, otherwise you need to specify the credentials to an account.


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.