Java/Tomcatデプロイメント用のARMテンプレートを使用して自動化された手順がいくつかありますが、証明書による自動ログインでは成功しません。Login-AzureRmAccount -ServicePrincipalで証明書エラーが発生しません
架空のドメイン "project.company.com"に対してOpenSSLを使用して自己署名入りの証明書を作成しました。セットアップにこの記事ADでのアプリケーションと貢献者の役割を持つサービスプリンシパル、 https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/#provide-certificate-through-automated-powershell-script
を以下の後、私は
「:いいえ証明書は拇印xxxxxxxxxxxxxxxxxxxとの証明書ストアに見つからなかったログイン-AzureRmAccount」エラー取得していますに従ってください。
Azureサブスクリプションレベルで何かが欠けているように見えます。これらの正確な手順は、LinuxボックスからのAzure CLIではうまく動作しますが、WindowsのAzure PowerShellでは動作しません。あなたが信頼されたルート証明機関ストアにパブリック証明書(.cerファイル)をインストールする必要が正しい証明書を検出するために、Azureのコマンドレットのために
$cert = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @("<my-path>/project.company.pfx", "<my-password>")
#$applicationId="xxxxxxxxxxxxxxxxxxxxx"
#$tenantId="dddddddddddddddddddddd"
#$subscriptionId="yyyyyyyyyyyyyyyyyyy"
#Login-AzureRmAccount -CertificateThumbprint $cert.Thumbprint -ApplicationId $applicationId -ServicePrincipal -TenantId $tenantId
$azureAdApplication = Get-AzureRmADApplication -IdentifierUri "https://project.company.com"
$subscription = Get-AzureRmSubscription
Login-AzureRmAccount -CertificateThumbprint $cert.Thumbprint -ApplicationId $azureAdApplication.ApplicationId -ServicePrincipal -TenantId $subscription.TenantId
ありがとうございます。私はそれを試みたが、私が間違っていたことを確かめなかった。 mmcで再試行し、信頼されたルート証明書に証明書(.pfx)を追加しましたが、機能しませんでした。再度個人用ストアの下で同じ証明書(.pfx)をインポートし、それは働いた。 –