Skip to content
Advertisement

Connecting to OUTLOOK365 from Selenium Java

I have an application that sends a verification code to my Email after entering credentials. I need to read the verification code from my inbox. I am using Outlook and my organization uses the MAPI protocol for OUTLOOK365.

Can anyone help me with this?

Advertisement

Answer

Using the Graph API one can access the Outlook.

  1. you need to register in Azure App.Usauly done by IT Team.you would get a client Id, Client secret and Tennant id.

  2. then you need to use Client credential autorization provider to get the tokken. below is the code from Microsoft Java SDK shared at https://github.com/Azure-Samples/ms-identity-java-daemon/blob/master/msal-client-credential-secret/src/main/java/ClientCredentialGrant.java

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement