Microsoft 365 SMTP Server Settings

NexGenHC
New Contributor III

Hi, I've tried all the options to connect our 365 account but nothing seems to be working, can anyone advise?

Current settings..
Server And Port Hostname or IP address: smtp.office365.com
Port number of the SMTP server: 587
Encryption Protocol to use for data encryption: TLSv1.2 (I've also tried all others)
Connection Timeout: 5 seconds (also tried 10 seconds)

The documentation doesn't say anything about MFA so i assume that's not a problem?

Thanks in advance!

19 REPLIES 19

Tillerman
New Contributor

Funny enough I ran into the same problem this morning. 

Just figured out that our problem was MFA on O365. Instead of using the account password for authentication, I setup another app password on O365 account, so that MFA was not blocking the login.

Microsoft link on how to setup app passwords on your O365 accounts.
https://support.microsoft.com/en-us/account-billing/manage-app-passwords-for-two-step-verification-d...

NexGenHC
New Contributor III

Hi! Thank you for the quick reply.

Having looked into this solution, it seems like we're unable to enable/use app passwords because we have security defaults enabled for our organisation/tenancy.

I've contacted MS support to see what the best solution is, but if you have/anyone has any comments or thoughts on the best thing to do, I'd appreciate the help.

Thanks again!

EDIT: I found how to enable the app passwords, created one, copied and pasted it into the SMTP settings with my UPN, but it still didn't work, sadly :(

aritta
New Contributor II

Same issue here. Jamf Pro fails to send email invite via smtp.office365.com. Jamf Pro support blames MS and MS tech support blames Jamf Pro. Basically, it's the victims fault.

Henry_Chang
New Contributor II
New Contributor II

Hi @NexGenHC 

If we want to integrate SMTP Server using O365 we need to enabled the SMTP Auth for the mailbox that you want to use.

You can check this document will may help you.

https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client... 

NexGenHC
New Contributor III

Thank you for the reply. Unfortunately, that option is already enabled.

aritta
New Contributor II

Update: when I switched from an O365 group email account to a regular shared email account the smtp server test was successful. I can send email invite if I use the regular shared email account. Does not work if I use an O365 group email account. 

NexGenHC
New Contributor III

Thanks for the update. Unfortunately, I'm not using any group/shared mailboxes, just a standard user mailbox.

joakimkingstrom
New Contributor

I'm having the same issue as you @NexGenHC. I'm using a normal account, no MFA, and with smtp auth enabled.

My jamf pro logs say this btw:
javax.mail.AuthenticationFailedException: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator.

anotherAdmin
New Contributor II

@NexGenHC I'm having the same issue. Did you ever find a solution for this?

Nope, sorry mate! Very frustrating.

Also having problems with our instance of the self-enrolment URL, doesn't want to load on some machines 🤦🏻‍

Nope, sorry mate! Very frustrating.

Also having problems with our instance of the self-enrolment URL, doesn't want to load on some machines 🤦🏻‍


If you're using Azure like I was and MFA is enabled I had to add the user to the Jamf Pro app I created in Enterprise Applications. Otherwise you can make a one time exception in the MFA rules within Azure.

anotherAdmin
New Contributor II

@NexGenHC  I just solved it earlier. I'll post a guide soon.

anotherAdmin
New Contributor II

@NexGenHC 

Hey, here is how I was able to successfully get SMTP to reach our M365 environment. I know everyone's is different but I hope this helps.

https://community.jamf.com/t5/jamf-pro/guide-how-to-configure-jamf-pro-smtp-with-m365/td-p/264099

 

Thanks again for your help, I do appreciate it; unfortunately, it seems the link to the message might be broken.

 

NexGenHC_0-1650545168829.jpeg

 

The post is no longer marked as spam, and the link will take you directly to the post.

@NextGenHC

☝️

Thank you 🙏

I'll have a read through it as soon as possible, implement what you suggest and let you know how I get on (it might be early next week).

Thanks again!

anotherAdmin
New Contributor II

@NexGenHC Hey, for some reason the post was marked as spam. I notified moderators and if they revert the mark I'll update you.

RaxiaDK
Contributor II

Hello

Do you get it to work?