简体   繁体   English

使用证书访问Azure AD API

[英]Accessing Azure AD API with certificate

I'm trying to develop a stand alone java process which will look into a dedicated email inbox hosted by Azure Active Directory. 我正在尝试开发一个独立的Java流程,该流程将调查Azure Active Directory托管的专用电子邮件收件箱。 The purpose is to retrieve a specific set of emails and perform operation. 目的是检索一组特定的电子邮件并执行操作。 Azure AD is providing REST API to perform the same using Auth2.0 authorization. Azure AD提供REST API以使用Auth2.0授权执行相同的操作。 However, access token expires in 60 mins. 但是,访问令牌将在60分钟后过期。 or so. 或者。 I want to use private/public key certification to perform the same. 我想使用私钥/公钥认证来执行相同的操作。 Is it achievable? 可以实现吗? If so, how to achieve the same. 如果是这样,如何实现相同。

Thanks in advance. 提前致谢。

There is a code sample for C# which seems to be similar with your needs, please see https://azure.microsoft.com/en-us/documentation/samples/active-directory-dotnet-daemon-certificate-credential/ . C#的代码示例似乎与您的需求相似,请参见https://azure.microsoft.com/zh-cn/documentation/samples/active-directory-dotnet-daemon-certificate-credential/ I think you can try to refer to the sample above to perform the needs in Java. 我认为您可以尝试参考上面的示例来执行Java中的需求。

Hope it helps. 希望能帮助到你。 Any concern, please feel free to let me know. 如有任何疑问,请随时告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM