Need a way to authenticate to Exchange Web Services


I'm using Exchange Web Services to Find, Create, Update, and Delete appointments from the calendars for one or more people. The application would be used by a manager to view employees' vacation time, as well as assign appointments based on availability.

In order for this to all work, an authenticated user's credentials must be sent to the web service. So far, the two methods that I have found that would allow for this are 1) passing in the username and password of each user and 2) impersonating a user to use DefaultCredentials. The DefaultCredentials option doesn't work for us because we do not allow impersonating users.

Does anyone know another way?

Best Solution

Are there company policy restrictions preventing you from using impersonation? Are you referring to Windows impersonation or Exchange impersonation?

Depending on which impersonation you cannot use, an alternative might be delegate acess.

If the goal is to let a manager view multiple mailboxes, here are some options:

(1) Grant delegate access to the employee mailboxes to the manager. Depending on the level of delegate access, this would allow the manager to view the employee mailboxes and edit as needed. There is one caveat about this approach, depending on what/how the access is granted, the delegate (employee) could remove the access, and stop the manager from viewing their calendars.

For authentication using delegate access, assuming the application using web services was running under the manager's context, you should be able to use DefaultCredentials.

(2) Create a service account that has either impersonation rights or delegate access over the employee mailboxes. Then log in as the service account.

As well, here are some links you might find useful...

Related Question