Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
auth_smtp_office_365.png 44.1 kB 1 05-Dec-2023 05:32 krivacsz
png
client_id.png 92.7 kB 1 05-Dec-2023 05:32 krivacsz
png
enable_access_token.png 50.3 kB 1 05-Dec-2023 05:32 krivacsz
png
microsoft_app_password.png 39.9 kB 2 06-Jun-2025 09:13 krivacsz
png
microsoft_enable_app_password.... 150.5 kB 1 06-Jun-2025 09:13 krivacsz
png
microsoft_security_details.png 164.8 kB 1 13-Jun-2025 03:31 krivacsz
png
ms_client_secet.png 88.6 kB 2 03-May-2025 02:37 krivacsz
png
new_registration.png 86.9 kB 1 05-Dec-2023 05:32 krivacsz
png
new_secret.png 138.7 kB 1 05-Dec-2023 05:32 krivacsz
png
permission_final.png 209.0 kB 1 05-Dec-2023 05:32 krivacsz
png
permission_microsoft_graph.png 182.9 kB 1 05-Dec-2023 05:32 krivacsz
png
pop_imap_task.png 141.8 kB 3 14-May-2025 02:49 krivacsz
png
register_app.png 230.6 kB 1 05-Dec-2023 05:32 krivacsz
png
smtp_from_email.png 50.3 kB 1 05-Dec-2023 05:32 krivacsz
png
smtp_get_refresh_token.png 44.7 kB 2 05-Dec-2023 05:32 krivacsz
png
tenant_security_defaults.png 74.0 kB 1 06-Jun-2025 09:30 krivacsz

This page (revision-202) was last changed on 13-Jun-2025 03:33 by krivacsz

This page was created on 05-Dec-2023 05:32 by krivacsz

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
About OAUTH2 for authentication: [Microsoft OAuth 2.0 : Get access on behalf of a user Link|https://docs.microsoft.com/en-us/graph/auth-v2-user]\\
!Microsoft Mail integration\\
----
!1. Microsoft App Passwords\\
At line 3 changed 2 lines
__!!! Proxy Configuration:__ If your server accesses the internet through a proxy, make sure to whitelist the following domains to allow authentication:\\
• login.microsoftonline.com\\
__⚠️ Constraints__: __It is only supported for accounts with 2-Step Verification enabled.__\\
At line 6 changed one line
!!!Microsoft Graph Application Registration\\
Microsoft App Passwords are special 16-character passwords used for apps that don’t support two-factor authentication (2FA). They are required when 2FA is enabled on your Microsoft account and you’re using legacy applications (like old email clients). You can generate and manage them from your Microsoft security settings at __account.microsoft.com/security__.\\
At line 8 changed 2 lines
This requires a __Microsoft Graph__ application registration. Start by visiting the Microsoft Azure portal:
[Link|https://azure.microsoft.com/en-us/features/azure-portal/]\\
Service can use __App Passwords__:\\
__SMTP__: smtp.office365.com\\
__IMAP__: imap-mail.outlook.com\\
__POP3__: pop-mail.outlook.com\\
----
At line 15 added 63 lines
__1.1 Microsoft Personal Accounts__ (@outlook.com, @hotmail.com, etc.):\\
🔴 App Passwords do not work with SMTP/IMAP/POP for these accounts anymore. __⚠️ Microsoft has deprecated basic auth for personal accounts__.\\
\\
----
__1.2 Microsoft 365 (work or school) accounts__:\\
\\
For Microsoft 365 (work or school) accounts, __App Passwords__ and __Multi-Factor Authentication (MFA)__ are managed centrally by your organization through __Microsoft Entra ID (formerly Azure Active Directory)__ — not through the personal Microsoft account portal.\\
\\
__How to enable App Passwords:__:\\
• Go to the legacy __MFA portal__: [MultifactorVerification Link|https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx] (Admin user)\\
• Click on the __Service settings__ tab.\\
• Enable the flag: __Allow users to create app passwords to sign in to non-browser apps__\\
[SMTP Microsoft Graph XOAUTH 2 Integration/microsoft_enable_app_password.png]\\
\\
__Check App Password Availability:__\\
a. Go to: [Security info Link| https://mysignins.microsoft.com/security-info]\\
b. Sign in with your work or school email\\
c. Follow the prompts to configure MFA using:\\
• Microsoft Authenticator app (recommended)\\
• Phone call or SMS (if permitted by your organization’s policy)\\
d. If enabled by your admin, click on __+Add sign-in method__ button and you will see an __App passwords__ link in the menu to generate one:\\
[SMTP Microsoft Graph XOAUTH 2 Integration|microsoft_app_password.png]\\
e. If you don’t see the __App passwords__ option:
Check and enforce MFA:\\
• Go to [MultifactorVerification Link|https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx] (Admin user)\\
• Find the target user.\\
• In the __MFA Status__ column, confirm it says: __Enforced__. Otherwise, enable __MFA__.\\
\\
__Check if Security Defaults are enabled:__\\
__App Passwords__ will not work if __Microsoft Entra ID Security Defaults__ are __enabled__ for your __tenant__.\\
To disable them:\\
• Go to the Microsoft Entra admin portal [Microsoft EntraLink|https://entra.microsoft.com] (Admin user)\\
• Navigate to: __Identity > Overview > Properties__ Scroll down to Security Defaults and click __Manage security defaults__\\
•Select Disable, then click Save. __Changes may take 5–10 minutes to take effect.__\\
[SMTP Microsoft Graph XOAUTH 2 Integration|microsoft_security_details.png]\\
[SMTP Microsoft Graph XOAUTH 2 Integration|tenant_security_defaults.png]\\
\\
🔴 __Error message__ like:\\
{{{Authentication unsuccessful, user is locked by your organization's security defaults policy. Contact your administrator.}}}
This indicates that your Microsoft 365 tenant has __Security Defaults__ enabled, which blocks __App Passwords__ completely, even if they were created successfully. Disable Security Defaults (if you’re the admin) [Microsoft Entra Link|https://entra.microsoft.com]. __Identity -> Overview -> Properties -> Manage security defaults__ \\
\\
----
\\
Usage:\\
{{{
Username: your_email@outlook.com
Password: [your generated app password]
}}}\\
\\
----
__⚠️ Note__: Microsoft strongly recommends modern authentication (__OAuth 2.0__) instead of app passwords. Some tenants block app passwords entirely for security reasons.\\
----
\\
!2. Microsoft Mail via OAuth 2.0 \\
Traditionally, __SMTP__/__IMAP__ authentication with Microsoft services (like Outlook or Microsoft 365) used username and password. However, Microsoft now strongly recommends (and in many cases enforces) the use of __OAuth 2.0__ for authentication, especially for enhanced security and compliance.\\
\\
About OAuth 2.0 ([OAuth Wikipedia Link|https://en.wikipedia.org/wiki/OAuth]) for authentication: [Microsoft OAuth 2.0 : Get access on behalf of a user Link|https://docs.microsoft.com/en-us/graph/auth-v2-user]\\
\\
__⚠️ Proxy Configuration:__ If your server accesses the internet through a proxy, make sure to whitelist the following domains to allow authentication: __login.microsoftonline.com__\\
This requires a __Microsoft Graph__ application registration.\\
\\
Start by visiting the __Microsoft Azure Portal__: [Link|https://azure.microsoft.com/en-us/features/azure-portal/]\\
\\
At line 15 changed one line
The Redirect URL must end with __"register_microsoft_graph_api/"__.\\
In the Redirect URI section, for Platform configuration, select __Web__. The Redirect URL must end with __register_microsoft_graph_api/__.\\
At line 18 removed one line
At line 20 changed 5 lines
}}}\\
or
{{{
or
At line 26 removed one line
At line 29 changed one line
__Secret key:__ A new client secret must be created. Go to __Certificates & secrets__, and generate a new client secret by clicking on __New client secret__. Ensure you copy over the __value__ immediately!\\
__Secret key:__ A new client secret must be created. Go to __Certificates & secrets__, and generate a new client secret by clicking on __New client secret__. ⚠️ Ensure you copy over the __value__ immediately!\\
At line 44 changed one line
__!!!Warning__: Make sure that the user's __SMTP AUTH__ is enabled, otherwise SMTP authentication will fail. You can view the official documentation here: [Enable or disable authenticated client SMTP submission (SMTP AUTH) in Exchange Online|https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission].\\
__⚠️ Warning__: Make sure that the user's __SMTP AUTH__ is enabled, otherwise SMTP authentication will fail. You can view the official documentation here: [Enable or disable authenticated client SMTP submission (SMTP AUTH) in Exchange Online|https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission].\\
At line 46 changed one line
__Note__: XOAUTH authentication requires user-delegated permissions, meaning the user must be a real, licensed user with authentication capabilities (i.e., they must have a valid product license and be able to sign in).\\
__Note__: OAuth 2.0 authentication requires user-delegated permissions, meaning the user must be a real, licensed user with authentication capabilities (i.e., they must have a valid product license and be able to sign in).\\
At line 49 changed one line
!!!SMTP settings\\
----
!3. SMTP settings\\
Navigate to __Server Admin__ -> __Preferences__ -> [General Settings] -> __SMTP Settings__:\\
At line 56 changed 2 lines
__SMTP Server Username, Password__: If the SMTP server address contains __office365__ or __outlook__, the corresponding __Get Refresh Token__ button will appear. Click that button to proceed.\\
__!!! Note__: To obtain the __Refresh Token__, the CrushFTP WebInterface’s host and port must match the __Redirect URL__ specified in the __Azure App Registration__. In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/\\
__SMTP Server Username, Password__:\\
----
__a.)__ __App passwords__: [Microsoft App Passwords Link|https://www.crushftp.com/crush11wiki/Wiki.jsp?page=SMTP%20Microsoft%20Graph%20XOAUTH%202%20Integration#section-SMTP+Microsoft+Graph+XOAUTH+2+Integration-1.MicrosoftAppPasswords]\\
{{{
SMTP Server Username: your_email@outlook.com
SMTP Server Password: [your generated app password]
}}}\\
----
__b.)__ __OAuth 2.0__: [Microsoft Mail via OAuth 2.0 Link|https://www.crushftp.com/crush11wiki/Wiki.jsp?page=SMTP%20Microsoft%20Graph%20XOAUTH%202%20Integration#section-SMTP+Microsoft+Graph+XOAUTH+2+Integration-2.MicrosoftMailViaOAuth2.0]\\
If the SMTP server address contains __office365__ or __outlook__, the corresponding __Get Refresh Token__ button will appear. Click that button to proceed.\\
__⚠️ Note__: To obtain the __Refresh Token__, the CrushFTP WebInterface’s host and port must match the __Redirect URL__ specified in the __Azure App Registration__. In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/\\
At line 64 changed one line
__!!! Note__: Be sure to sign in with the __Microsoft Account__ that has the __necessary permissions__, as configured in the Azure App Registration mentioned above.\\
__⚠️ Note__: Be sure to sign in with the __Microsoft Account__ that has the __necessary permissions__, as configured in the Azure App Registration mentioned above.\\
At line 67 changed one line
__From email address__: You must also specify the __From__ email address. __!!! Imnportant__ The __From__ address must exactly match __the signed-in Microsoft user’s email address__ (i.e., the account used to obtain the refresh token). Otherwise, SMTP authentication will fail.\\
__From email address__: You must also specify the __From__ email address. __⚠️ Important__ The __From__ address must exactly match __the signed-in Microsoft user’s email address__ (i.e., the account used to obtain the refresh token) or the account associated with the App Password. Otherwise, SMTP authentication will fail.\\
At line 73 changed one line
!!!PopImapTask
----
!4. PopImapTask\\
At line 76 changed 2 lines
Ensure that the IMAP protocol is enabled for the user. See the description: [Managing email apps for user mailboxes Link|https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access].\\ __Office 365__:Navigate to the Microsoft 365 Admin Center. [Link|https://admin.microsoft.com/Adminportal/Home?#/homepage]. Select the user and enable the IMAP protocol at "Manage email apps".\\
Provide the host and click on the Get Refresh Token button.\\
Ensure that the IMAP protocol is enabled for the user. See the description: [Managing email apps for user mailboxes Link|https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access].\\ __Office 365__:Navigate to the Microsoft 365 Admin Center. [Link|https://admin.microsoft.com/Adminportal/Home?#/homepage]. Select the user and enable the IMAP protocol at __Manage email apps__.\\
At line 81 changed one line
smtp.office365.com
outlook.office365.com
At line 155 added one line
__Port__: __993__\\
At line 157 added 9 lines
__Mail Username, Password__:\\
----
__a.)__ __App passwords__: __⚠️ Constraints__: __It is only supported for accounts with 2-Step Verification enabled.__\\ [Microsoft App Passwords Link|https://www.crushftp.com/crush11wiki/Wiki.jsp?page=SMTP%20Microsoft%20Graph%20XOAUTH%202%20Integration#section-SMTP+Microsoft+Graph+XOAUTH+2+Integration-1.MicrosoftAppPasswords]\\
{{{
Mail Username: your_email@outlook.com
Mail Password: [your generated app password]
}}}\\
----
__b.)__ __OAuth 2.0__: Configure the __App registration__. See at [Microsoft Mail via OAuth 2.0|https://www.crushftp.com/crush11wiki/Wiki.jsp?page=SMTP%20Microsoft%20Graph%20XOAUTH%202%20Integration#section-SMTP+Microsoft+Graph+XOAUTH+2+Integration-1.MicrosoftMailViaOAuth2.0]\\
At line 85 changed 2 lines
__Port__: __997__\\
__!!! Note__: To obtain the Refresh Token, the CrushFTP WebInterface’s host and port must match the Redirect URL specified in the Azure App Registration. In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/\\
__⚠️ Note__: To obtain the Refresh Token, the CrushFTP WebInterface’s host and port must match the Redirect URL specified in the Azure App Registration. In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/\\
At line 90 changed 2 lines
__!!! Note__: Be sure to sign in with the __Microsoft Account__ that has the __necessary permissions__, as configured in the Azure App Registration mentioned above.\\
Since the email address is required after obtaining the refresh token, the Mail Username field must be adjusted.
__⚠️ Note__: Be sure to sign in with the __Microsoft Account__ that has the __necessary permissions__, as configured in the Azure App Registration mentioned above.\\
Since the email address is required after obtaining the refresh token, the Mail Username field must be adjusted.\\
At line 181 added 4 lines
----
For more information, see the general POP/IMAP Task description: [POP/IMAP Task – CrushFTP Documentation Link| https://www.crushftp.com/crush11wiki/Wiki.jsp?page=CrushTask#section-CrushTask-POP3IMAP]\\
----
\\
Version Date Modified Size Author Changes ... Change note
202 13-Jun-2025 03:33 12.794 kB krivacsz to previous
201 13-Jun-2025 03:33 12.793 kB krivacsz to previous | to last
« This page (revision-202) was last changed on 13-Jun-2025 03:33 by krivacsz
G’day (anonymous guest)
CrushFTP11 | What's New

Referenced by
LeftMenu

JSPWiki