az ad app credential reset
,它会附加或覆盖应用程序的密码(即 client secret
)或证书凭据。
az ad app credential reset --id
[--append]
[--cert]
[--create-cert]
[--credential-description]
[--end-date]
[--keyvault]
[--password]
[--years]
示例(您也可以指定其他参数,这取决于您):
az ad app credential reset --id xxxxxxxxxxxx --append
获取应用程序注册的客户端ID 例如:“appId”:“b23e2416-xxxx-xxxx-98d4”
创建:
az ad app credential reset --id b23e2416-xxxx-xxxx-98d4 --append \
--display-name 'Description: Secret Bolivia client' --end-date '2024-12-31'
输出:
The output includes credentials that you must protect.
Be sure that you do not include these credentials in your code or check the credentials into your source control.
For more information, see https://aka.ms/azadsp-cli
{
"appId": "b23e2416-xxxx-xxxx-98d4",
"password": "rp28Q~VNlFt-xxxxxxxxxxxxxxxxxxxxxxx",
"tenant": "67f3b853-xxxx-xxxx-xxxx"
}