3. Please enter the appropriate credentials. After entering the appropriate credentials, you will be redirected to a page similar to this image.
4. Export the Certificate.
To export the certificate, follow the below steps
Click on the lock symbol in the URL >> Click on the pad lock symbol >> Click on connection >> More Information >> Security >> View Certificate >> Miscellaneous >> Download >> PEM (chain) (X.509 Certificate with Chain ( PEM )) format >> Save
Click on View Certificate
5. Go to <server_home>\jre\bin folder in the command prompt / terminal app. Execute the below command
keytool -import -alias outlook.com -keystore ../lib/security/cacerts -file ../yourCertificate.crt
( If you have jssecacerts file in the security folder, then give jssecacerts instead of cacerts as the keystore. )
6. Provide password as "changeit" when prompted.
7. If the certificate is valid, it will prompt "do you trust this certificate?". Type 'yes' and press enter.
8. Certificate will be added to the keystore.
9. Restart the application service once and check whether you could able to connect to EWS.