variable
variable

Reputation: 9724

How to remove permission of azure devops pipeline from an Azure VM?

I deploy .net web app via azure pipelines onto IIS on an azure vm via the web deploy task.

To do this I had to initially configure the deployment group by running a script on the azure vm as explained here (see step 5): https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-deploygroups?view=azure-devops&tabs=net#create-a-deployment-group

The project has completed and now I want to remove the permission of the pipeline to the azure vm. How to remove the permission of azure devops pipeline from an Azure VM?

Upvotes: 0

Views: 682

Answers (1)

wade zhou - MSFT
wade zhou - MSFT

Reputation: 8468

The project has completed and now I want to remove the permission of the pipeline to the azure vm.

DevOps pipeline uses the account(when you setup agent, default is "nt authority\system") to access the agent.

enter image description here

You can uninstall the deployment group agent to remove the access:

  1. Launch powershell,go to agent folder.
  2. Run .\config.cmd remove to uninstall.

After it's done, it will remove the agent service and also VSTS group user below.

enter image description here

If you specify user not default, you can even directly delete the user from the machine to remove the permission.

Upvotes: 1

Related Questions