> For the complete documentation index, see [llms.txt](https://docs.alemba.com/asm-eos-10.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alemba.com/asm-eos-10.5/asm-gaia-10.4/setup-and-configure-asm/setting-up-your-system/setup-email/setting-up-incoming-and-outgoing-email/configuring-exchange-web-services-ews/prerequisites.md).

# Prerequisites

EWS Email Configuration Prerequisites

## Authorizing User&#x20;

1. A user account with a valid mail licence used for authentication with EWS \
   e.g. Office 365 E3&#x20;
2. This users email address can be used for sending and receiving email but Alemba recommends using a Shared Mailbox.
3. Users can be created and managed in the Microsoft 365 Admin Center. &#x20;

{% embed url="<https://admin.microsoft.com/AdminPortal/Home?#/users>" %}

{% hint style="warning" %}
The user must be able to login to authorize the EWS connection and must be delegated permissions to send and receive emails using the specified email address. Email Address for Send and Receive&#x20;
{% endhint %}

{% hint style="info" %}
The Mail User account and related email address may be used for sending and receiving email. &#x20;

Alemba recommends configuring a shared mailbox for this purpose.  &#x20;
{% endhint %}

Shared Mailboxes are created in the Exchange Admin Center: &#x20;

{% embed url="<https://admin.exchange.microsoft.com/#/mailboxes>" %}

<figure><img src="https://content.gitbook.com/content/xP0IZ1PKDWM22PFPFi0l/blobs/qQKGVLasfJHABWF0xyvu/Screen%20Shot%202022-11-09%20at%2011.40.10%20AM.png" alt=""><figcaption></figcaption></figure>

## Email Address for Send and Receive&#x20;

The Mail User account and related email address may be used for sending and receiving email. &#x20;

Alemba recommends configuring a shared mailbox for this purpose.  &#x20;

Shared Mailboxes are created in the Exchange Admin Center: &#x20;

{% embed url="<https://admin.exchange.microsoft.com/#/mailboxes>" %}

<figure><img src="https://content.gitbook.com/content/xP0IZ1PKDWM22PFPFi0l/blobs/AMBNBbR6YVHdgoZKJ9hP/Screen%20Shot%202022-11-09%20at%2011.45.37%20AM.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/xP0IZ1PKDWM22PFPFi0l/blobs/FL6EYDEQppMUbB8GZdCP/Screen%20Shot%202022-11-09%20at%2011.46.10%20AM.png" alt=""><figcaption></figcaption></figure>

Allow the “Authorizing User” to “Read and Manage” and “Send as” the Shared Mailbox using “Manage mailbox delegation”

<figure><img src="https://content.gitbook.com/content/xP0IZ1PKDWM22PFPFi0l/blobs/xMrInU44hyxLzWKoZFTi/Screen%20Shot%202022-11-09%20at%2011.46.43%20AM.png" alt=""><figcaption></figcaption></figure>

## Azure App Registration&#x20;

Register an application in Azure for a Web type client. This is used to authorize the connection from ASM to EWS&#x20;

Details on how to create an app registration can be found here: &#x20;

{% embed url="<https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-authenticate-an-ews-application-by-using-oauth?redirectedfrom=MSDN#register-your-application>" %}

* Add web redirect url to the app registration in the following format: \
  *Error! Hyperlink reference not valid.*
* Create a client secret for the app registration. Make a note of the secret and keep it secure. You will need it later.&#x20;

## Configure ASM&#x20;

Ensure the ASM web site has a https binding with a valid [SSL certificate](/asm-eos-10.5/asm-gaia-10.4/integrate/managing-integration/single-sign-on-using-saml/ssl-binding.md). This is required for the web redirect url.

Enable “Email OAuth 2.0 Support” in the [Preview Features/Advanced](/asm-eos-10.5/asm-gaia-10.4/setup-and-configure-asm/setting-up-your-system/system-administration-settings/preview-features-advanced-options.md) Features of system admin. You may need to log out for the changes to take effect.&#x20;
