你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzureADMSApplicationKey
向应用程序添加新密钥。
语法
New-AzureADMSApplicationKey
-ObjectId <String>
-KeyCredential <KeyCredential>
[-PasswordCredential <PasswordCredential>]
-Proof <String>
[<CommonParameters>]
说明
向应用程序添加新密钥。
示例
示例 1:向应用程序添加密钥凭据
PS C:\>New-AzureADMSApplicationKey -ObjectId 14a3f1ac-46a7-4d00-b1ca-0b2b84f033c2 -KeyCredential @{ key=[System.Convert]::FromBase64String("{base64cert}") } -PasswordCredential @{ displayname = "mypassword" } -Proof "{token}"
此命令将添加指定应用程序的密钥凭据。
参数
-KeyCredential
要添加的应用程序密钥凭据。
注意:keyId 值应为 null。
Type: | KeyCredential |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ObjectId
特定于 Azure Active Directory 对象的对象的唯一标识符
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PasswordCredential
要添加的应用程序密码凭据。
注意:keyId 值应为 null。
Type: | PasswordCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Proof
已签名的 JWT 令牌,用作现有密钥的所有权证明
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
string
Microsoft.Open.MSGraph.Model.KeyCredential
Microsoft.Open.MSGraph.Model.PasswordCredential
输出
Microsoft.Open.MSGraph.Model.KeyCredential
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈