由于最近推动从Azure删除Entra App秘密,并在服务连接中采用工作负荷身份联合会的做法,我已将客户从服务负责人处除名,并在其中增加了联邦证书。
我该如何通过这个服务负责人登录Azure?
先前此登录是通过以下代码进行的:
Write-Host Object Id = $objectId
$key = ConvertTo-SecureString -String $env:servicePrincipalKey -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $env:servicePrincipalId, $key
Connect-AzAccount -ServicePrincipal -TenantId $env:tenantId -Credential $Credential
我尝试了很多文件,但找不到任何可接受的文件。寻求帮助。
Is there any other way I can achieve this via pipeline. I have a release pipeline which uses service connection based on Workload Identity Federation (automatic). The Service Principal made out of this step has federated credentials. In the next step in my pipeline, I am using a powershell script which has this login step.