我们正在尝试从 powershell 为 b2c 租户中的应用程序创建秘密。
经过大量搜索后,发现这些命令在正常应用程序中运行良好。
$StartDate = Get-Date
$EndDate = $StartDate.AddYears(5)
New-AzureADApplicationPasswordCredential -CustomKeyIdentifier b2csecret -ObjectId 6133a24a-2cc7-4b47-901c-2e2c67b0bed6 -EndDate $EndDate
但是对于任何身份提供者或组织目录(用于通过用户流验证用户)类型中的帐户应用程序,这都失败了。
New-AzureADApplicationPasswordCredential : Error occurred while executing SetApplication
Code: Request_BadRequest
Message: Updates to converged applications are not allowed in this version.
RequestId: 9630857f-6d32-4788-8637-0a15967beb22
DateTimeStamp: Wed, 05 Apr 2023 13:22:19 GMT
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At line:3 char:1
+ New-AzureADApplicationPasswordCredential -CustomKeyIdentifier b2csecr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADApplicationPasswordCredential], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD.Graph.PowerShell.Custom.NewAzureADA
pplicationPasswordCredential
这个版本不允许升级融合应用,那有没有办法?如何从 powershell 以编程方式在
Accounts in any identity provider or organizational directory (for authenticating users with user flows)
类型的 b2c 应用程序中创建秘密?