0
votes

I am developing a Calendar Portlet using ews-java-api v.2 for our Liferay Portal. When the user signed in in liferay, he shouldn't have to sign in again in Calendar portlet. But ExchangeService needs either username/password or securityToken to connect. In liferay I have only the encrypted password(I cannot change it) and it is not useful for ews.

How should I generate the securityToken? Is there any other way to do that?

1

1 Answers

0
votes

You can use an user with specific permission for login and use the impersonation for acceding the user events. Configure impersonation

and use in java like this way

ExchangeService exchangeService = new ExchangeService(...)
exchangeService.ImpersonatedUserId = 
                             new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mailBox);