[英]Error while publishing a vs project to Azure “An item with the same key has already been added”
[英]Getting "An item with the same key has already been added" Error when I try to create a new client secret via AzAD module
我很困惑。 我正在尝试使用 powershell 为 Azure 应用程序创建新的客户端密码。 我遇到错误“已添加具有相同密钥的项目”,但目前没有为应用程序分配客户端密码。 任何想法都会很棒。
Connect-AzAccount
$sp = Get-AzADServicePrincipal -DisplayName "TS-Test-14-Oct-2021"
$start = Get-Date -Format "o"
$end = (Get-Date).AddYears(1) | Get-Date -Format "o"
$Guid = (New-guid).toString()
$Password = @{
displayName= 'Hi'
endDateTime= $end
hint= 'NIL'
keyId= "$Guid"
secretText= 'xxxx'
startDateTime= $start
}
New-AzADAppCredential -ObjectId $sp.Id -PasswordCredentials $Password
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.