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!