[英]Azure KeyVault: how to create clientId and clientSecret?
[英]How to get clientId and clientsecret for Azure (ARM) deployment template
我想自動化我的 Azure 資源管理,我正在使用 ARM 模板來做到這一點。
如果我想從我的 C# 代碼(下載 Azure 導出模板時生成的 DeploymentHelper.cs)連接到 Azure。
該代碼要求提供以下詳細信息:
string subscriptionId = "your-subscription-id";
string clientId = "your-service-principal-clientId";
string clientSecret = "your-service-principal-client-secret";
string resourceGroupName = "resource-group-name";
string deploymentName = "deployment-name";
string resourceGroupLocation = "resource-group-location"; // must be specified for creating a new resource group
string pathToTemplateFile = "path-to-template.json-on-disk";
string pathToParameterFile = "path-to-parameters.json-on-disk";
string tenantId = "tenant-id";
我可以通過powershell查看tentantId和subscriptionId,但我不知道如何獲取clientId和clientsecret,而且我也找不到有關如何獲取這些的可靠說明。
您是否在AD中創建了服務主體? 如果是這樣,您應該擁有這些值。 如果還沒有,請按照msft指南進行操作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.