Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 557
coder1 Avatar asked Oct 07 '08 15:10

coder1


People also ask

How do I authenticate an EWS application by OAuth?

To use OAuth with your application you will need to: Register your application with Azure Active Directory. Add code to get an authentication token to get an authentication token from a token server. Add an authentication token to EWS requests that you send.

Does Exchange Web services use modern authentication?

Modern Auth (OAuth authentication) for EWS is only available in Exchange Online as part of Office 365. EWS applications using OAuth requires the "Full access to users' mailbox" permission to work. Full Mailbox Access is, therefore, the only permission type that can be granted for EWS Applications.

What authentication does Exchange use?

Note - Exchange Server supports the Kerberos authentication protocol and NTLM for authentication. The Kerberos protocol is the more secure authentication method and is supported on Windows 2000 Server and later versions.

How are Exchange Online users authenticated?

The email client sends the username and password to Exchange Online. Note: When Basic authentication is blocked, it's blocked at this step. Exchange Online sends the username and password to Azure Active Directory. Azure Active Directory returns a user ticket to Exchange Online and the user is authenticated.


1 Answers

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...

  • Using Delegate Access with Exchange Web Services (http://msdn.microsoft.com/en-us/library/bb655860.aspx)
  • Exchange Web Services and Delegate Access (http://msdn.microsoft.com/en-us/library/bb204081.aspx)
  • Configuring Exchange Impersonation (http://msdn.microsoft.com/en-us/library/bb204095.aspx)
  • Using Exchange Impersonation (http://msdn.microsoft.com/en-us/library/bb204088.aspx)
like image 168
Alice Avatar answered Oct 14 '22 05:10

Alice