gpt4 book ai didi

azure - 如何使用 azure AD 图 API 获取客户端 key 到期日期

转载 作者:行者123 更新时间:2023-12-01 13:38:52 24 4
gpt4 key购买 nike

我正在尝试获取 AAD 应用程序的客户端 secret 的到期日期。但是,当我使用以下图形请求时,passwordCredential 和 keyCredential 字段为空。

https://graph.windows.net/myorganization/directoryObjects/ {ServicePrincipalObjectId}/?api-version=1.6

有办法获取这些数据吗?如果我下载它,我会在 list 中看到它,但不会在 Odata 对象中看到它

感谢您的帮助!

最佳答案

使用下面的 AAD Graph API:

https://graph.windows.net/{org_domain}/applications/{obj_id}/passwordCredentials

响应将显示您的特定 AAD 应用程序使用的 key 列表。

您可以从 endDate 字段得出 key 的到期日期。

{
"odata.metadata": "https://graph.windows.net/{org_domain}/$metadata#Collection(Microsoft.DirectoryServices.PasswordCredential)",
"value": [
{
"customKeyIdentifier": null,
"endDate": "2018-05-07T09:12:13.2177408Z",
"keyId": "{your_key_id}",
"startDate": "2016-05-07T09:12:13.2177408Z",
"value": null
}
]
}

关于azure - 如何使用 azure AD 图 API 获取客户端 key 到期日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42035321/

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