gpt4 book ai didi

powershell - 如何创建 Azure AD 应用程序 key ?

转载 作者:行者123 更新时间:2023-12-03 01:48:30 25 4
gpt4 key购买 nike

是否可以通过 PowerShell 创建 Azure AD 应用程序 key ?

我确实找不到任何可行的解决方案。目前我有这段代码:

$appName = "myAppName"
$password = "myPassword"

$app = New-AzureRmADApplication -DisplayName $appName -HomePage "https://$appName" -IdentifierUris "https://$appName" -Password $password
New-AzureRmADServicePrincipal -ApplicationId $app.ApplicationId

New-AzureRmRoleAssignment -RoleDefinitionName "Data Factory Contributor" -ServicePrincipalName $app.ApplicationId

到目前为止一切正常,但我还需要为应用程序创建一个 key ,以便客户端实际访问它。在 Azure 门户中,这将位于 MyDirectory --> App Registrations --> myAppName --> Settings --> Keys

而且我不太确定应用程序的密码实际用于什么?!

最佳答案

好的,我找到了这篇博文,它似乎解决了我的问题: https://www.sabin.io/blog/adding-an-azure-active-directory-application-and-key-using-powershell/

关于powershell - 如何创建 Azure AD 应用程序 key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42630372/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com