Azure DevOps无法部署到Azure Web App [英] Azure DevOps unable to deploy to Azure Web App
问题描述
Am目前正尝试将应用程序从公司A拥有的Azure DevOps下的发布管道部署到公司B拥有的Azure托管的Azure应用.
Am currently trying to deploy an app from a Release Pipeline under Azure DevOps owned by Company A to an Azure App hosted on Azure owned by Company B.
尝试释放时继续出现此错误,请停止Azure应用:
Keep on getting this error when attempting to release stop the Azure App:
错误:无法获取资源类型的资源ID "Microsoft.Web/站点"和资源名称"AppName".错误:无法 获取托管服务主体的访问令牌.请配置 虚拟机的托管服务身份(MSI) ' https://aka.ms/azure-msi-docs ".状态码:400,状态消息:错误 请求
Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'AppName'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request
不知如何解决这个问题.
Am at a loss on how to solve this.
到目前为止已完成的工作:
What has been done so far:
- Web应用程序是在公司B的Azure中创建的
- DevOps公司的用户一个帐户已添加为公司Azure AD中的来宾用户
- 用户在Web应用程序上具有贡献者权限
- 在Web App上将托管服务标识设置为开"
- 在Azure DevOps中设置发行版时,可以查看和选择Company B和Web Apps的订阅.
我非常确定要使发布部署正常工作还需要更多,但是经过大量搜索之后,我什么都找不到.
Am quite sure that more needs to be in order for the release deployment to work, but after an intensive search, I was not able to find anything.
希望这里的任何人都可以提供建议.
Hope anyone here can advise.
推荐答案
设法找到我遇到的问题的解决方案. ``这与Azure订阅上的来宾帐户的访问权限有关.
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.
以下是将公司A的Azure DevOps连接到公司B的Azure的步骤:
These are the steps that were followed to connect the Azure DevOps of Company A to the Azure of Company B:
- 在B公司Azure中创建Web应用
- A公司的Azure DevOp帐户被添加为来宾用户" 在公司B的Azure中
- DevOp的帐户在两个Azure上均被授予贡献者权限 订阅和Web应用程序.
- 在A公司的DevOps中,添加一个``Azure资源管理器''.选择 B公司的Azure设置为服务主体身份验证"
- 保存Azure资源管理器后,将提示您登录. 您将需要使用B公司的Azure管理员帐户登录.
- 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.
这篇关于Azure DevOps无法部署到Azure Web App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!