We want to use VMSS instances as our Azure Devops Agent pool. The agentpool deploys the TeamServicesAgent Virtual machine extension to the instances deployed. This extension calls the script: https://vstsagenttools.blob.core.windows.net/tools/ElasticPools/Windows/17/enableagent.ps1
In this script the user azdevops is created and added to the Administrators group. We do not find this very secure and we would like to apply a least privilege scenario on this user.
Is there an official way or good alternative to get here? I have created a workaroud where we host this script our self in a storage account and then skip the Add to Administrator part, then give the user SeBatchLogonRight. This works but i would like a more robust way to get there.
Also there seems to be no documentation on the TeamServicesAgent Extension. Which parameters are allowed etc.
Do you have suggestions for me?
Thanks all in advance for thinking with me,
Nathan