如何使用azure AD图API获取客户端秘密到期日期。 [英] How to get client secret expiry date using the azure AD graph API.

查看:83
本文介绍了如何使用azure AD图API获取客户端秘密到期日期。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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


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


有没有办法获取这些数据?我在清单中看到它,如果我下载它,只是不在Odata对象中


感谢您的帮助!


解决方案

尝试应用程序对象。似乎可以将密钥添加到应用程序或servicePrinciapsl中。我使用了AAD Graph API,它显示了两个对象的不同密钥集。我可以使用任何凭据实际登录。



滤波器= APPID +当量+ '2f8a8757-7ee9-4c7d-a958-0faaf04fa2ef'"> https://graph.windows.net/meraridom.com/servicePrincipals?

filter = appId + eq +'2f8a8757-7ee9-4c7d-a958-0faaf04fa2ef'


返回:


{

  " odata.metadata":" https://graph.windows.net/meraridom.com/


I am trying to get the expiry date of the client secrets for our AAD application. However when I use the following graph request, the passwordCredential and keyCredential fields is blank. 

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

Is there a way to get this data? I see it in the manifest if I download that, just not in the Odata object

Thank you for your help!

解决方案

Try the application object. Seems like keys can be added to either application or servicePrinciapsl. I used AAD Graph API and it shows different set of keys for the two objects. I can use any of the credentials to actually log in.

https://graph.windows.net/meraridom.com/servicePrincipals?


filter=appId+eq+'2f8a8757-7ee9-4c7d-a958-0faaf04fa2ef'

returns:

{
  "odata.metadata": "https://graph.windows.net/meraridom.com/


这篇关于如何使用azure AD图API获取客户端秘密到期日期。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆