---
title: Using Office 365 (OAuth2) as SMTP
description: "Using Office 365 (OAuth2) for SMTP Mail sending 1. Prerequisites Microsoft 365 tenant with Exchange Online. Admin access to: Azure Active Directory..."
---

[Skip to content](https://crm.edloomio.com/docs/category/integrations/using-office-365-oauth2-as-smtp#main-content)

English

Show submenu for translations

[Tickets](https://crm.edloomio.com/support?hsLang=en)

![edloomio](https://crm.edloomio.com/hs-fs/hubfs/edloomio-logo-2027.png?width=611&height=139&name=edloomio-logo-2027.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Tickets](https://crm.edloomio.com/support)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [AI LMS Platform](https://crm.edloomio.com/docs?hsLang=en)
2. [Integrations](https://crm.edloomio.com/docs/integrations?hsLang=en)

# Using Office 365 (OAuth2) as SMTP

## Using Office 365 (OAuth2) for SMTP Mail sending 1.

### Using Office 365 (OAuth2) for SMTP Mail sending

## 1. Prerequisites

- **Microsoft 365 tenant** with Exchange Online.
- **Admin access** to:
  
    - Azure Active Directory (Entra ID)
    - AI LMS Platform platform SMTP/global email settings.
- A **valid Microsoft 365 mailbox** (e.g. `noreply@yourdomain.com`) that will be used as sender.

## 2. Create an Azure AD app registration

1. **Sign in** to the Azure portal and go to **Azure Active Directory** → **App registrations**.
2. Click **New registration**.
3. **Name**: e.g. `AI LMS Platform SMTP OAuth2`.
4. **Supported account types**: usually “Accounts in this organizational directory only”.
5. Click **Register**.
6. After creation, you’ll land on the **app overview** page—keep this open.

You will need later:

- **Application (client) ID**
- **Directory (tenant) ID**

## 3. Create a client secret

1. In the app, go to **Certificates & secrets**.
2. Click **New client secret**.
3. Add a **Description** (e.g. `AI LMS Platform SMTP`), choose an **expiry** period.
4. Click **Add**.
5. **Copy the Value** of the secret immediately and store it securely.
   
   After you leave/refresh the page, you cannot see it again.

You will need:

- **Client secret value**

## 4. Configure authentication (public client flows)

1. In the app, go to **Authentication**.
2. Look for **“Allow public client flows”** (or similar).
3. Set this to **Yes**.
4. Click **Save**.

## 5. Add Microsoft Graph API permissions

1. In the app, go to **API permissions**.
2. Click **Add a permission** → choose **Microsoft Graph**.
3. Select **Application permissions**.
4. Add:
   
     - **Mail.Send** (under *Mail*)
     - **User.Read.All** (under *User*)
5. Click **Add permissions**.
6. Have an **Azure AD admin** click **Grant admin consent** for your organization.
7. Confirm that both permissions show as **Granted**.

## 6. Collect all required values

You should now have:

- **Tenant ID**
- **Client ID** (Application ID)
- **Client secret value**
- **Sender email address** (Microsoft 365 mailbox, e.g. `you@yourdomain.com`)

## 7. Configure SMTP/OAuth2 in AI LMS Platform

In the platform

1. Go to **Settings**→ **SMTP settings**
2. Choose **Office 365 OAuth2** in the dropdown options
3. Fill in the fields roughly as follows:

- **Host:** The host URL
- **Tenant ID:** your Azure AD tenant ID
- **Port:** `587`
- **Encryption:** `TLS`
- **Client ID:** the Application (client) ID from the app registration
- **Client secret:** the secret value you copied
- **Sender email:** the Microsoft 365 mailbox (e.g. `noreply@yourdomain.com`)
- **From name:** e.g. `AI LMS Platform platform` or your organization name

## 8. Test and verify

1. Use the **“Test email”** or **“Send test message”** button
2. Send a test email to your own address.
3. Confirm:
   
     - The email is delivered.
     - The **From address** and **display name** are correct.
4. If it fails, double‑check:
   
     - Tenant ID, Client ID, Client secret.
     - Permissions (Mail.Send, User.Read.All) and **admin consent**.
     - That the sender mailbox exists and is licensed.

- [Reports](https://crm.edloomio.com/docs/reports?hsLang=en)
- [Integrations](https://crm.edloomio.com/docs/integrations?hsLang=en)
- [Settings](https://crm.edloomio.com/docs/settings?hsLang=en)
- [Support](https://crm.edloomio.com/docs/support?hsLang=en)
- [Productivity Plugins](https://crm.edloomio.com/docs/productivity-plugins?hsLang=en)
- [User Management](https://crm.edloomio.com/docs/user-management?hsLang=en)
- [Learning Plugins](https://crm.edloomio.com/docs/learning-plugins?hsLang=en)
- [Talent Plugins](https://crm.edloomio.com/docs/talent-plugins?hsLang=en)
- [Automations](https://crm.edloomio.com/docs/automations?hsLang=en)
- [Ecommerce Plugins](https://crm.edloomio.com/docs/ecommerce-plugins?hsLang=en)
- [Dashboard](https://crm.edloomio.com/docs/dashboard?hsLang=en)
- [Course Learning Objects](https://crm.edloomio.com/docs/course-learning-objects?hsLang=en)
- [External Integrations](https://crm.edloomio.com/docs/external-integrations?hsLang=en)
- [Course Management](https://crm.edloomio.com/docs/course-management?hsLang=en)
- [Safety Plugins](https://crm.edloomio.com/docs/safety-plugins?hsLang=en)
- [Certificate Management](https://crm.edloomio.com/docs/certificate-management?hsLang=en)
- [Get Started with AI LMS Platform](https://crm.edloomio.com/docs/get-started-with-ai-lms-platform?hsLang=en)
- [Changelog](https://crm.edloomio.com/docs/changelog?hsLang=en)
- [Security & Compliance](https://crm.edloomio.com/docs/security-compliance?hsLang=en)
- [Marketing Plugins](https://crm.edloomio.com/docs/marketing-plugins?hsLang=en)

[![edloomio](https://crm.edloomio.com/hs-fs/hubfs/edloomio-logo-2027.png?width=611&height=139&name=edloomio-logo-2027.png "edloomio")](https://edloomio.com)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, Edloomio Group bv