Home:ALL Converter>Azure DevOps Hosted Build Agent MSI

Azure DevOps Hosted Build Agent MSI

Ask Time:2018-11-26T02:18:20         Author:Julian.Net

Json Formatter

I have an ASP.Net Core 2.1 project with a test project that contains some integration tests that require/need Azure Managed Service Identity access to run successfully (getting secrets from KeyVault). I am using an Azure DevOps VS2017 Hosted Build Agent to build the project for deployment to Azure App Service. The issue I am running into is that when the tests run after the build pipeline they fail since MSI access is not available on the hosted build agent. How can I go about setting the appropriate MSI access needed for the hosted build agent? Is it possible to do so via a Powershell task or something equivalent?

Thanks!

Author:Julian.Net,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53470481/azure-devops-hosted-build-agent-msi
yy