Programmatically get EWS accesstoken
<p>I have a working EWS connection, but at the moment I have to fill in my username and password everytime that I stop the app. Eventually alot of different users will use the application. Is there a way to programmatically get an accesstoken which I can store in the localstorrage? (I don't want to save the password)</p>

<pre><code>    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);

    ExchangeCredentials credentials = new WebCredentials(username, password);
    service.setCredentials(credentials);

    service.setUrl(new URI("https://domain/EWS/Exchange.asmx"));
</code></pre>