We are using Java Mail API to read an unattended mailbox from the office365. I have been told the default access will be no longer available and we have to use oauth2 API's from Microsoft. We only want to access couple of unattended mailbox from our cloud domain. How do we register the app (permissions) and if there is a Java sample code available for the same?