UPDATE April 19, 2024: Exchange team made announcement of retiring Application Impersonation. From May 2024 you will not be able to assign this role, and from February 2025 this role and all its features will be removed.
February 2025 - Critical Update: ApplicationImpersonation RBAC Role Deprecation in Exchange Online
Microsoft announced ApplicationImpersonation RBAC Role Deprecation in 2024. As the deprecation date of February 2025 approaches, it is vital for administrators and developers to take immediate action to ensure a smooth transition. This follow-up article aims to reinforce the urgency and provide clear guidance on the necessary steps. You can migrate the integration to the Full Access permission or Microsoft Graph API integration.
More information is available at Exchange Team Blog.
Create an impersonation user to be able to connect Microsoft Office 365 via Exchange Web Services.
Impersonation is an option 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
Login to Exchange Admin Center.
Select Permissions on the left.
Click on +.
Add a Role.
Select ApplicationImpersonation.
Click on Add.
Click on OK.
Add Members.
Select Service.
Click on Add.
Click on OK.
Click on Save.