Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small corrections and polish to setup oauth smtp for M365 #740

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ This page describes the necessary steps to make SMTP work using OAuth with Micro
## 1. Check some settings in DNN
> [!WARNING]
> To avoid errors with the authentication in step 5, make sure that the SSL settings are correct. It must be set on **ON**.
* Personabar - Security - More - SSL Settings: Make sure that SSL Settings = **ON** (/images/scr-m365-oauth-sslsetting.png)
* Personabar - Security - More - SSL Settings: Make sure that SSL Settings = **ON**
![Alt text](/images/scr-m365-oauth-sslsetting.png "SSL settings")

* Personabar - Security - Login settings: Check the site administrator account. You need to use this e-mail address in M365, because the site administrator is the sender.

## 2. Create a mailbox in M365 Exchange
* Create a mailbox with a licence. Use the address of the site administrator.
* As Admin => Userdetails - E-mail - E-mail apps: In the account settings ensure that the option *Verified SMTP* is enabled.

> [!WARNING]
> [!NOTE]
> In the tenant settings Verified SMTP is not always enabled. You can enable this option for a user with the Powershell command: `Set-CASMailbox -Identity [login-address] -SmtpClientAuthenticationDisabled $false`

> In Powershell ISE:
> In Powershell:
> * Install-Module -Name ExchangeOnlineManagement
> * Connect-ExchangeOnline -Organization [TENANTID]
> * Set-CASMailbox -Identity [login-address] -SmtpClientAuthenticationDisabled $false
Expand All @@ -53,6 +55,11 @@ Create an **App registration** (portal.azure.com -> App registrations)
* Select **Microsoft Graph** -> Delegated -> SMTP.Send (Send emails from mailboxes using SMTP AUTH) -> Add permission
* Select **APIs my organisation uses** -> Office 365 online -> Application permissions ->

> [!NOTE]
> Grant admin consent
![Alt text](/images/scr-m365-oauth-permissions.png "Grant admin consent ")


* In the left menu > Overview
* Copy the **Directory (tenant) ID** for later use
* Copy the **Application (client) ID** for later use
Expand All @@ -64,7 +71,7 @@ Create an **App registration** (portal.azure.com -> App registrations)
* Copy the **Application ID**
* Copy the **Object ID**

**In Powershell ISE:**
**In Powershell:**
* Install-Module -Name ExchangeOnlineManagement
* Connect-ExchangeOnline -Organization **[TENANTID]**
* New-ServicePrincipal -AppId **[Application ID]** -ObjectId **[Oject ID]**
Expand Down
Binary file added images/scr-m365-oauth-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading