Create an impersonation user to be able to connect Microsoft Office 365 via Exchange Web Services.
Impersonation is the best choice when you're dealing with multiple mailboxes because you can easily grant one service account access to every mailbox in the database. Delegation and folder permissions are convenient only when you're granting access to a few selected users because you have to add permissions to each mailbox individually. For more information see Microsoft.

To create an Impersonation user

  1. Login to Exchange Admin Center.

  2. Select Permissions on the left.

  3. Click on +.

  4. Add a Role.

  5. Select ApplicationImpersonation.

  6. Click on Add.

  7. Click on OK.

  8. Add Members.

  9. Select Service.

  10. Click on Add.

  11. Click on OK.

  12. Click on Save.

Did this answer your question?