04-20-2022 11:50 AM - edited 04-20-2022 11:51 AM
Overview:
I was really struggling to configure SMTP with M365. We have a distribution list that our Operations team are all apart of and wanted to receive email notifications from Jamf for a variety of reasons.
Our environment has MFA enabled and I was continuously fighting with both Jamf/Azure to figure out a workaround to the authentication errors I was seeing in the Jamf Server Logs.
It wasn't until after creating a service account without MFA applied it(account being authenticated in Jamf SMTP) and enabling "Send As" and "Send on behalf" in the distribution list by adding the service account to the delegates list that mail was delivered.
Lets look at a couple server logs I was experiencing first.
Server Log Error generated from an account with MFA enabled:
With the error above I messed around in Azure quite a bit and got no where. I made exceptions with my user for MFA and I attempted trying to configure an "App Password" which doesn't seem to exist anymore? Or at least was not available within my users account settings for some reason.
Server log Error generated from authenticating with a service account created in M365 with no MFA enabled.
The "SendAsDenied" stuck out to me and I remembered in Exchange that you could configure an account to "Send As". It wasn't until after enabling the service account (account being authenticated in Jamf SMTP) to send as the distribution list that I was targeting mail was finally delivered.
Below is the configuration / solution which allowed for mail to be delivered successfully from Jamf Pro to our M365 Server using a service account without MFA.
Microsoft 365 Configuration:
Step 1: Navigate to admin.microsoft.com
Step 2: Users > Active Users > Add a User
Step 3: Navigate to Exchange Online Admin Center from M365 Admin Center.
Step 4: Navigate to Recipients > Groups > Distribution List and locate the Distribution List you want to target.
Step 5: Select the Distribution List > Settings > Manage Delegates > Edit Delegates > Add a delegate > Add the service account you created and choose the “send on behalf” option. Save changes.
Jamf Pro Configuration:
Step 1: Sign into your Jamf Cloud Instance
Step 2: Select the Settings cog in the top right
Step 3: Navigate to System Settings > SMTP Server
Step 4: Enter the following information:
Step 5: Save and Test. At this point I received an email.
Note: This is how I accomplished this, it may not work for your environment. If you think I skipped a step or didn't explain something clearly please let me know and I'll take a look.
Posted on 04-27-2022 01:02 AM
Thank you for your guide, I keep getting: javax.mail.AuthenticationFailedException: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled. [AS8PR07CA0033.eurprd07.prod.outlook.com]
This not working for me: Disable Basic authentication in Exchange Online | Microsoft Docs
Posted on 06-23-2022 11:06 PM
it was a time issue, it work for me now
Posted on 06-03-2022 07:19 PM
Foe Me Its work First time only Not sure why But its working
"A test message was successfully sent."
Posted on 07-11-2022 12:37 PM
Can anyone here get the "Sender Display Name" to work? I've got the emails working fine, but I never get the Sender Display Name to use what I have entered, and it's confusing as I have a bunch of Jamf servers...
Thank you
Posted on 07-11-2022 01:52 PM
Mine Work fine
Posted on 08-26-2022 12:52 AM
Hi, it's not working! I tried this:
- Created an user in Outlook
- Enabled SMTP Auth for that user mailbox.
- smtp.outlook365.com | 587
- TLS1.2 and connection timeout 15sec
Added username (email) and password
Not working!
Posted on 08-26-2022 12:55 AM
try use your EOP on port 25
Posted on 08-26-2022 01:14 AM
I tried this not working.
Posted on 08-26-2022 01:18 AM
I do this, but look your log
Posted on 08-26-2022 01:02 AM
I tried this not working.
Posted on 08-26-2022 10:22 AM
Odd, this was working until the 10.40.1 update...now it's not. This sucks!
Posted on 08-29-2022 01:29 PM
Well, this may be part of what we're seeing...we recently changed our auth to modern using OKTA verify, so we'll have to see if we can make changes or change to another email solution for this:
Basic Authentication Deprecation in Exchange Online – May 2022 Update
Posted on 06-07-2023 09:46 PM
Yeah, since Microsoft enforced Modern Authentication at the end of 2022, it completely broke this. You can allow Basic Authentication for the single email account to get it working, but this is a security risk.
I suggest putting a vote on this feature request to get Jamf to intergrade with Modern Auth:
Posted on 08-17-2023 11:20 AM
Am I correct in thinking that auth should still work if you setup an App Password on an account that has Enforced MFA? As long as you enable SMTP auth on the account it should work with the App Password?
Posted on 07-11-2023 05:04 AM
I have done everything as suggested here but its not working for us. What else we need make changes in the both side JAMF pro and M365 side?
Posted on 11-21-2023 01:20 AM
Worked fine up to begin of November (last succesfull use is from 02/11). Tested yesterday and it is not working anymore.
Posted on 11-30-2023 12:28 PM
Joining the party. Has anybody successfully set up SMTP with Jamf and M365?
Posted on 12-13-2023 01:31 AM
So far (extensive) testing shows that it works once or twice and then stops. We have the idea that MFA kicks in and everything stops.
Posted on 01-04-2024 01:32 PM
Same issue. Looks like port 25 is completely blocked in Jamf Cloud: https://learn.jamf.com/bundle/technical-articles/page/Network_Ports_Used_by_Jamf_Pro.html
"Note: To help keep data and communications as secure as possible, port 25 is blocked in Jamf Cloud. Jamf recommends using port 587 with TLS."
No luck with 587 at the moment either.
Posted on 01-05-2024 01:40 AM
Tried the 587 with various TLS settings and multiple newly created accounts several times and nothing works. It is rather strange though that a new account does work shortly (send once or twice succesfully), before getting blocked. Looks like MFA suddenly kicks in or the address gets blacklisted somewhere?
Posted on 01-05-2024 04:21 AM
Same here. Since port 25 is blocked, we tried port 587 and 465 with various TLS settings.
Nothing.
We have a ticket in with Microsoft but they are pointing at Jamf. We're stuck. Is it a Jamf or Microsoft thing?
Have you guys looked into your Firewall rules? We're checking to see if the list of new IPs is whitelisted and see if that helps.
Posted on 01-05-2024 04:28 AM
I did find something about it in a "idea-section" of Jamf (ideas.jamf.com/ideas/JN-I-16171, add https:// in front of it) that refers to it. Looks like they are aware, but not doing much yet about it. And there is a command shown that might help.
Posted on 01-10-2024 07:45 AM
My understanding is that the issue with it working once or twice then stopping is due to new Microsoft default policies kicking in "require MFA" for any users with a risk status of medium or above. This paired up with their recent stricter triggers for risk (new IP, or using smtp), seems to be causing the issue.
Thus.... the oauth/modern auth feature request is becoming even more crucial.
Posted on 02-12-2024 06:50 AM
I spoke with Jamf Support about this the past few weeks. We have an O365 account that has basic authentication and SMTP AUTH enabled, and we used to use it with direct send method before port 25 got shut down by Jamf. We tried to switch to SMTP AUTH configuration, but in Jamf Server logs kept seeing a message about basic auth being disabled for the account (even though it definitely wasn't).
After getting escalated in Jamf Support, we were told that the only way to use O365 as an SMTP server in Jamf now was to use app passwords (which our org has disabled). I tried to press for any information on the roadmap for OAuth and didn't get any response.
Posted on 02-12-2024 06:58 AM
We got ours to work in Jamf Production and test. We ended up changing a Microsoft Conditional Access policy.
Posted on 02-12-2024 06:59 AM
Do you have some details on that? And did that really solve it?
Posted on 03-15-2024 12:46 PM
Can you please explain, what changes you have made?
Posted on 02-13-2024 11:56 AM
Yesterday i realzied i have not been receiving emails from Jamf when a device goes into\leaves a particular Smart Group. I went into the smtp settings, and like many of you, it fails with a generic unable to connect to server message. I have tried to increase the timeout as well as change from tls 1.2 to SSL, and both did not work. I also currently have a case open with Support, but so far they have not been much help.
02-19-2024 11:58 AM - edited 02-19-2024 11:59 AM
Like others we noticed our reports from Jamf Pro not getting sent to us and found out our SMTP broke because we were using port 25. Here is what we did:
- Created a service account, gave it O365 E1 license (Online only).
- Created a mailbox for the account (if you are a hybrid environment do it on your exchange server and sync it to the cloud).
- Changed the login creds from our tenant to "@companyname.onmicrosoft.com" This allows you to login directly to Microsoft.
- The sender also needs to match up with the username authenticating to the cloud. Otherwise the Sender will need to be an O365 account as well and be given "sendas" permissions on the SMTP account.
- To limit the access into the service account, we locked down IMAP,POP & Mapi.
Look at the Jamf Pro Console Server logs if you do an SMTP test and it fails. That is how we noticed our issue with not having the Authentication account and Sender Email Address the same.
"SendAsDenied; notify@companyname.onmicrosoft.com not allowed to send as jamf_notice@companyname.com;"
Hopefully this helps someone running into this issue.
Posted on 03-26-2024 10:55 AM
This worked for me. I had to use a business basic license. Wish there was a 'free' workaround.
Thanks for the writeup.
Posted on 03-26-2024 12:31 PM
Could you go into a bit more detail about what you did? We tried this setting with a licensed account but it still wasn't working for us. Did you have to change anything on the tenant?
Posted on 03-26-2024 12:56 PM
I followed this exactly. I didnt change anything in the process other than I had to use a different M$ license type for my M$ account (Business Basic vs OP's E1 license).
Posted on 04-01-2024 08:21 AM
I thought I replied to this?
I followed the exact steps by @stutz above. I didnt change anything in the process.
Posted on 04-01-2024 08:14 AM
Posted on 04-01-2024 08:22 AM
I am a cloud basic customer if that's what it is? I think there are multiple tiers for cloud and we're basic or whatever?
Posted on 03-21-2024 06:08 AM
It's wild to me how bad the support answer has been from jamf on Microsoft stopping support for basic auth. App passwords? Disable MFA? Really?
Jamf supports SMTP in their other product (Protect) from what I've read, how in the world are they not supporting it for their SaaS customers?
Posted on 04-04-2024 03:43 AM
I assume this was in beta release notes for awhile and we missed it - and jamf support didn't mention it despite us asking for a solution now for weeks. It's an interesting solution for jamf not wanting to provide SMTP themselves, I guess.
Posted on 04-04-2024 07:00 AM
Well that looks like fun. Thanks for finding it. We'll give it a shot.
Posted on 04-05-2024 08:44 AM
Thanks for sharing, scheduling a meeting with our M365 team to see if this is something they can get on board with since App Passwords seems like a non-starter.