|
103 | 103 | <div class="article row grid-right">
|
104 | 104 | <div class="col-md-10">
|
105 | 105 | <article class="content wrap" id="_content" data-uid="set-up-oauth-microsoft-365">
|
106 |
| -<h1 id="ehow-to-implement-oauth-using-dnn-and-microsoft-365">EHow to implement OAUTH using DNN and Microsoft 365</h1> |
| 106 | +<h1 id="how-to-implement-oauth-using-dnn-and-microsoft-365">How to implement OAUTH using DNN and Microsoft 365</h1> |
107 | 107 | <div class="page-version">
|
108 | 108 | DNN Version: <span class="dnn-version">09.02.00</span>
|
109 | 109 |
|
110 | 110 | </div>
|
111 | 111 | <div class="page-stats row visible-xs">
|
112 |
| - <div class="pull-left"> • Less than 1 minute to read</div> |
| 112 | + <div class="pull-left"> • 4 minutes to read</div> |
113 | 113 | </div>
|
114 | 114 | <div class="page-stats row visible-sm visible-md visible-lg visible-xl">
|
115 |
| - <span class="pull-left"> • Less than 1 minute to read</span> |
| 115 | + <span class="pull-left"> • 4 minutes to read</span> |
116 | 116 | </div>
|
117 | 117 |
|
118 |
| -<h2 id="placeholder">Placeholder</h2> |
119 |
| -<p>This is a new page. Tutorial wil follow soon</p> |
| 118 | +<h2 id="introduction">Introduction</h2> |
| 119 | +<p>This page describes the necessary steps to make SMTP work using OAUTH with Microsoft 365.</p> |
| 120 | +<h2 id="setup-steps">Setup steps</h2> |
| 121 | +<ol> |
| 122 | +<li>Check some settings in DNN</li> |
| 123 | +<li>Create a mailbox in M365 Exchange</li> |
| 124 | +<li>Create an APP registration in the M365 Azure</li> |
| 125 | +<li>Grant access to the app to use the mailbox</li> |
| 126 | +<li>Setup the mailbox in DNN</li> |
| 127 | +</ol> |
| 128 | +<h2 id="1-check-some-settings-in-dnn">1. Check some settings in DNN</h2> |
| 129 | +<div class="WARNING"> |
| 130 | +<h5>Warning</h5> |
| 131 | +<p>To avoid errors with the authentication in step 5, make sure that the SSL settings are correct. It must be set on <strong>ON</strong>.</p> |
| 132 | +</div> |
| 133 | +<ul> |
| 134 | +<li>Personabar - Security - More - SSL Settings: Make sure that SSL Settings = <strong>ON</strong> (/images/scr-m365-oauth-sslsetting.png)</li> |
| 135 | +<li>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.</li> |
| 136 | +</ul> |
| 137 | +<h2 id="2-create-a-mailbox-in-m365-exchange">2. Create a mailbox in M365 Exchange</h2> |
| 138 | +<ul> |
| 139 | +<li>Create a mailbox with a licence. Use the address of the site administrator.</li> |
| 140 | +<li>As Admin => Userdetails - E-mail - E-mail apps: In the account settings ensure that the option <em>Verified SMTP</em> is enabled.</li> |
| 141 | +</ul> |
| 142 | +<div class="WARNING"> |
| 143 | +<h5>Warning</h5> |
| 144 | +<p>In the tenant settings Verified SMTP is not always enabled. You can enable this option for a user with the Powershell command: <code>Set-CASMailbox -Identity [login-address] -SmtpClientAuthenticationDisabled $false</code></p> |
| 145 | +</div> |
| 146 | +<blockquote> |
| 147 | +<p>In Powershell ISE:</p> |
| 148 | +<ul> |
| 149 | +<li>Install-Module -Name ExchangeOnlineManagement</li> |
| 150 | +<li>Connect-ExchangeOnline -Organization [TENANTID]</li> |
| 151 | +<li>Set-CASMailbox -Identity [login-address] -SmtpClientAuthenticationDisabled $false</li> |
| 152 | +</ul> |
| 153 | +</blockquote> |
| 154 | +<h2 id="3-create-an-app-registration-in-the-m365-azure">3. Create an APP registration in the M365 Azure</h2> |
| 155 | +<p>Create an <strong>App registration</strong> (portal.azure.com -> App registrations)</p> |
| 156 | +<ul> |
| 157 | +<li><p>Give it a name and choose the <strong>single tenant</strong> option</p> |
| 158 | +</li> |
| 159 | +<li><p>In the left menu -> Manage - Authentication and choose <strong>Add a platfom</strong> => <strong>web</strong>:</p> |
| 160 | +<ul> |
| 161 | +<li>enter your domainname</li> |
| 162 | +</ul> |
| 163 | +</li> |
| 164 | +<li><p>In the left menu -> Manage - Authentication and choose <strong>Add redirect URIs</strong>:</p> |
| 165 | +<ul> |
| 166 | +<li>https://[SITEURL]/Providers/SmtpOAuthProviders/ExchangeOnline/Authorize.aspx</li> |
| 167 | +<li>https://[SITEURL]</li> |
| 168 | +</ul> |
| 169 | +</li> |
| 170 | +<li><p>In the left menu -> Manage - Certificates and Secrets</p> |
| 171 | +<ul> |
| 172 | +<li>Choose <strong>New client secret</strong>:</li> |
| 173 | +<li>Create a secret and save your key for later use.</li> |
| 174 | +</ul> |
| 175 | +</li> |
| 176 | +<li><p>In the left menu -> Manage - API permissions and choose <strong>Add a permission</strong>:</p> |
| 177 | +<ul> |
| 178 | +<li>Select <strong>Microsoft Graph</strong> -> Delegated -> SMTP.Send (Send emails from mailboxes using SMTP AUTH) -> Add permission</li> |
| 179 | +<li>Select <strong>APIs my organisation uses</strong> -> Office 365 online -> Application permissions -></li> |
| 180 | +</ul> |
| 181 | +</li> |
| 182 | +<li><p>In the left menu > Overview</p> |
| 183 | +<ul> |
| 184 | +<li>Copy the <strong>Directory (tenant) ID</strong> for later use</li> |
| 185 | +<li>Copy the <strong>Application (client) ID</strong> for later use</li> |
| 186 | +</ul> |
| 187 | +</li> |
| 188 | +</ul> |
| 189 | +<h2 id="4-grant-access-to-the-app-to-use-the-mailbox">4. Grant access to the app to use the mailbox</h2> |
| 190 | +<p><strong>In Azure:</strong></p> |
| 191 | +<ul> |
| 192 | +<li>Search for <strong>Enterprise applications</strong></li> |
| 193 | +<li>Search for application</li> |
| 194 | +<li>Copy the <strong>Application ID</strong></li> |
| 195 | +<li>Copy the <strong>Object ID</strong></li> |
| 196 | +</ul> |
| 197 | +<p><strong>In Powershell ISE:</strong></p> |
| 198 | +<ul> |
| 199 | +<li>Install-Module -Name ExchangeOnlineManagement</li> |
| 200 | +<li>Connect-ExchangeOnline -Organization <strong>[TENANTID]</strong></li> |
| 201 | +<li>New-ServicePrincipal -AppId <strong>[Application ID]</strong> -ObjectId <strong>[Oject ID]</strong></li> |
| 202 | +<li>Get-ServicePrincipal | fl |
| 203 | +<ul> |
| 204 | +<li>Copy the value of <strong>SID</strong></li> |
| 205 | +</ul> |
| 206 | +</li> |
| 207 | +<li>Add-MailboxPermission -Identity "[mailaddress]" -User [SID] -AccessRights FullAccess</li> |
| 208 | +</ul> |
| 209 | +<h2 id="4-setup-the-mailbox-in-dnn">4. Setup the mailbox in DNN</h2> |
| 210 | +<ul> |
| 211 | +<li><p>Personabar - Servers - Server settings</p> |
| 212 | +</li> |
| 213 | +<li><p>SMTP authentication:</p> |
| 214 | +<ul> |
| 215 | +<li>SMTP Authentiaction: <strong>OAUTH</strong></li> |
| 216 | +<li>Auth Provider: <strong>Exchange Online</strong></li> |
| 217 | +<li>Tenant id: <strong>[Your Tenant ID]</strong></li> |
| 218 | +<li>Client id: <strong>[Your Client ID]</strong></li> |
| 219 | +<li>Client Secret: <strong>[Your Secret]</strong></li> |
| 220 | +</ul> |
| 221 | +</li> |
| 222 | +<li><p>Click <strong>Authorize</strong></p> |
| 223 | +</li> |
| 224 | +<li><p>Enter your mailbox user credentials</p> |
| 225 | +</li> |
| 226 | +<li><p>Click <strong>Test SMTP Settings</strong> to check if the setup is successful.</p> |
| 227 | +</li> |
| 228 | +</ul> |
| 229 | +<blockquote> |
| 230 | +<p><strong>Your OAuth provider's configuration has been completed.</strong></p> |
| 231 | +</blockquote> |
120 | 232 | </article>
|
121 | 233 | </div>
|
122 | 234 |
|
|
0 commit comments