![](/img/trans.png)
[英]Getting the service principal for an Azure Automation Account connection using PowerShell
[英]Azure automation account - how to use custom service principal for login instead of run as account?
在 Azure 自動化帳戶中 - 如何使用已經存在的服務主體登錄 powershell 運行手冊而不是作為帳戶運行?
我們沒有特權在我們的組織中創建服務主體..所以想使用已經存在的服務主體。
只需使用以下命令。
$azureAplicationId ="<client-id>"
$azureTenantId= "<tenant-id>"
$azurePassword = ConvertTo-SecureString "<client-secret>" -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential($azureAplicationId , $azurePassword)
Connect-AzAccount -Credential $psCred -TenantId $azureTenantId -ServicePrincipal
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.