简体   繁体   中英

OAuth2 for Office365 REST API for Java Application

I have created a simple application in Java which Connects to my Office 365 Account and retrieve the unread messages. I am performing some text matching and pattern matching to generate some reports which I receive via Email.

I am using the below url with basic Authentication to do so.

https://outlook.office365.com/api/v1.0/me/messages ?$filter=IsRead%20eq%20false

However, I have read a couple of articles and most of them have suggested that Basic Authentication will not be supported and suggested to use OAUTH2.0.

I am not sure how to use OAUTH2.0. A couple of articles mention about registering the Application with AAD for which i need to have access to Azure Management Portal which i do not have. Please can any one guide me how this can be done.

PS: I am using my Corporate Domain Account to access Office

You are correct that Basic will not continue to be supported. You do not need the Azure management portal to register an application, you can use the App Dev portal (apps.dev.microsoft.com) to get a client ID and secret.

Here's a walkthrough for creating a Java web app from scratch: https://dev.outlook.com/restapi/tutorial/java . It shows how to register the app and do the authentication.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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