Azure DevOps unable to deploy to Azure Web App
Managed to find the solution to the problem I encountered. It was related to the access rights of the guest account on the Azure subscription.
First of all "Managed Service Identity" was not related to this issue.
These are the steps that were followed to connect the Azure DevOps of Company A to the Azure of Company B:
- Created Web App in Company B Azure
- Azure DevOp's account from Company A, was added as a "Guest User" in the Azure of Company B
- The DevOp's account is given Contributor rights on both the Azure Subscription, and the Web app.
- In Company A's DevOps, add a "Azure Resource Manager". Choose the settings of Company B's Azure as "Service Principal Authentication"
- Upon saving Azure Resource Manager, you will be prompted to login. You will need to login with the admin account of Company B's Azure.
I had this problem, and it was an MSI issue but not resolved by creating a VM as is suggested elsewhere on the internet. In my case, I had reset the MSI ID of the app service, which broke the service connection in DevOps (though DevOps didn't tell me this -_-).
It was resolved by removing and re-adding the service connection in DevOps, and re-selecting it in the release pipeline settings.