> For the complete documentation index, see [llms.txt](https://docs.alemba.com/asm-hermes/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-hermes/setup-and-configure-asm/setting-up-your-system/setup-email/setting-up-incoming-and-outgoing-email/configuring-exchange-web-services-ews/prerequisites.md).

# Prerequisites

{% hint style="info" %}
The Mail User account and related email address may be used for sending and receiving email.  **Alemba recommends configuring a shared mailbox for this purpose.** &#x20;

* Users can be created and managed in the Microsoft 365 Admin Center.  <https://admin.microsoft.com/AdminPortal/Home?#/users>
* Shared Mailboxes are created in the Exchange Admin Center:  <https://admin.exchange.microsoft.com/#/mailboxes>
  {% endhint %}

## Authorizing User&#x20;

1. A user account with a valid mail license used for authentication with EWS \
   e.g. Office 365 E3&#x20;

{% 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 %}

<figure><img src="/files/uGVXfRantnpAQvrMzMYm" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/nVBgRKfFKIQ5mX36og2S" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/WJN7lfVFZ8zCLL6vcKjh" 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="/files/Jz8erP8OHarj9KwdNWPl" alt=""><figcaption></figcaption></figure>

## Azure App Registration&#x20;

1. 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>" %}

2. Add [web redirect url ](/asm-hermes/setup-and-configure-asm/setting-up-your-system/setup-email/setting-up-incoming-and-outgoing-email/configuring-exchange-web-services-ews/prerequisites/web-redirect-url-configuration.md)to the app registration
3. Create a [client secret](/asm-hermes/setup-and-configure-asm/setting-up-your-system/setup-email/setting-up-incoming-and-outgoing-email/configuring-exchange-web-services-ews/prerequisites/creating-an-azure-client-secret.md) 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-hermes/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-hermes/setup-and-configure-asm/configuring-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;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.alemba.com/asm-hermes/setup-and-configure-asm/setting-up-your-system/setup-email/setting-up-incoming-and-outgoing-email/configuring-exchange-web-services-ews/prerequisites.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
