This guide provides step-by-step instructions to configure OAuth 2.0 so that EventSentry can send email alerts through a Microsoft 365 mailbox.
On the Overview page, copy the Application (client) ID (CLIENT_ID) and the Directory (tenant) ID (TENANT_ID).
IMPORTANT: Select the Web platform, not Mobile and desktop applications. EventSentry authenticates using a client secret, which makes it a confidential client. Registering the same URI under Mobile and desktop marks the application as a public client, and Microsoft will then reject the secret. Sign-in will appear to succeed, but EventSentry will report 401 Unauthorized.
Copy the value shown in the Value column and save it (CLIENT_SECRET). Note the expiry date. Email delivery will stop when the secret expires, and the secret must be renewed and re-entered in EventSentry
IMPORTANT: Copy the Value, not the Secret ID. The Value is displayed only once; if you navigate away from this page you cannot retrieve it and will need to create a new secret. Confusing these two values is the most common cause of a 401 Unauthorized error later in this guide.
Microsoft Graph - Delegated:
| Permission | Description |
|---|---|
| Mail.Send | Send mail as the signed-in user |
| offline_access | Issues a refresh token so EventSentry keeps sending without repeated sign-ins |
| SMTP.Send | Send mail via SMTP AUTH |
| User.Read | Sign in and read the signed-in user's profile |
Office 365 Exchange Online - Delegated:
| Permission | Description |
|---|---|
| Mail.Send | Send mail as a user through the Exchange Online API |
Note: If "Office 365 Exchange Online" does not appear under APIs my organization uses, search instead for its application ID: 00000002-0000-0ff1-ce00-000000000000. If that also returns no match, the service principal is not provisioned in your tenant.
| Field | Value |
|---|---|
| Client ID | CLIENT_ID |
| Client secret | CLIENT_SECRET |
| Server Auth Url | https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize |
| Server Token Url | https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token |
| Scope | offline_access Mail.Send |
Note: Replace TENANT_ID in both URLs with your Directory (tenant) ID.
Then click Initialize to open a browser window and log in with your credentials. Once logged in, you should see an "Authorization Successful" message in your browser and an "Authentication OK" status in the EventSentry Management Console.
Finish setting up your Email Action and use the "Send Test Email" option within the action. You should receive an email similar to this:
How to enable API access to Microsoft Entra ID (AzureAD)?
Documentation: Authentication
Manage your cookie preferences below:
To learn more about our use of cookies, please see our
Privacy Policy.