首页 文章

WebApp部署到Azure

提问于
浏览
3

我正在尝试将构建部署到Azure WebApp .

在Azure(http://manage.windowsazure.com)中,我将Web应用程序链接到我的Visual Studio Online(VSTS)帐户 .

在VSTS中,我使用单个任务创建了一个发布定义(Azure Web App部署);任务配置为使用管理模块中定义的 endpoints . 服务 endpoints 配置为使用凭据 . 凭据使用的是Microsoft帐户 .

发布失败,出现以下错误:

2015-12-02T18:17:35.4422685Z AzurePSCmdletsVersion= 0.9.8.1
2015-12-02T18:17:35.5692677Z Get-ServiceEndpoint -Name foo -Context Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.TaskContext
2015-12-02T18:19:07.5877546Z Username= ********
2015-12-02T18:19:07.5887893Z azureSubscriptionId= foo-foo-foo-foo-foo
2015-12-02T18:19:07.5907904Z azureSubscriptionName= Pay-As-You-Go
2015-12-02T18:19:07.6278127Z Add-AzureAccount -Credential $psCredential
2015-12-02T18:19:09.7755541Z ##[error]-Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account.
2015-12-02T18:19:09.9664413Z ##[error]There was an error with the Azure credentials used for deployment.

如何设置发布以使用Azure帐户的Microsoft帐户?

2 回答

  • 2

    没有't any way to use a Microsoft Account Credential to connect to Azure from VSO service endpoint for now. You need to use an Organization account. If you don' t,您可以使用"Certificate Based"身份验证轻松连接到Azure . 单击this link以获取订阅文件,然后将订阅文件中的认证字符串粘贴到VSO "Management Certificate"区域 .

  • 6

    Add-AzureAccount cmdlet,使用Azure Active Directory(Azure AD)身份验证访问令牌,Azure AD使用组织帐户 .

    Microsoft帐户凭据(以前称为LiveID)在Azure AD身份验证方案中不起作用 .

    这在此处作为建议和截至目前的设计报告:

    https://github.com/Azure/azure-powershell/issues/477

相关问题