Azure管理证书被禁止(ForbiddenError)

时间:2014-08-05 14:14:25

标签: powershell azure x509certificate

我的目标是使用powershell脚本来获取Get-HostedService的天蓝色服务实例。

作为准备工作,我创建了一个自签名证书,并根据http://msdn.microsoft.com/en-us/library/gg551722.aspx通过Azure管理门户上传为管理证书。

之后,我

  • PS cert:\CurrentUser\My
  • 中查看我的证书及其指纹
  • 指纹符合我在manage.windowsazure.com>中可以看到的指纹。设置>管理证书

我的测试脚本只是尝试创建一个$service实例,如下所示:

Add-PSSnapin WAPPSCmdlets
$cert = Get-Item cert:\CurrentUser\My\<thumbprint of certificate>
$service = Get-HostedService <my service name> -Certificate $cert -SubscriptionId <my subscription id>

第3行(Get-HostedService命令)导致:

Get-HostedService : HTTP Status Code: ForbiddenError - HTTP Error Message: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.

机器(A)我试图这样做是在企业防火墙后面。根据我们的IT,防火墙日志中没有可能表示存在问题的事件。相同的脚本在另一台防火墙(在DMZ中)后面的另一台机器(B)上工作。但是,这两台机器都可以访问互联网。

我尝试使用相同的证书(从机器A导出并导入机器B)以及为新机器A创建新证书。

在两台计算机上,证书上的双cllcking(在mmc管理单元中)显示:

This CA Rot certificate is not trusted. To enable trust, install certificate in the trusted Root Certification Authorities store

You have a private key that corresponds to this certificate

我尝试将证书添加到&#34;受信任的根CA&#34;但这没有帮助。

证书

  • sha1 RSA 2048位
  • 未过期

如何解决问题或获取更多调试信息?

0 个答案:

没有答案
相关问题