How do I set up an Office 365 email account for Jira Service Desk

Bill Kunneke June 19, 2018

We have created a Jira SD project and want to associate an external email with the project.  We've navigated to Project Settings -> Email Requests and tested the work flow with the built in Atlassian email and the flow works.  But now we want to add a custom email address and here lies our problem. 

Background details on the email:

Microsoft Office 365 
NOT a shared mailbox, it's a regular user
We've tested to make sure someone can login to the account from a browser 

When we navigate to Project Settings -> Email Requests -> Add a custom email address and fill in the appropriate settings, we can't get Jira to connect to the email.  We've worked with our IT and tried over  20 combinations of protocols (POP3, iMAP, etc) with numerous port settings (both the defaults and the ones recommended by Microsoft).  We've read through documentation, read posts on the net, but we can't find a resolution.  

Some of the error messages we've received:

Authenticate failed
No login methods supported 
Logon failure unknown user name or password
Command is not valid in this state
Timeout trying to reach server

Our IT is just as baffled as we are, we never expected this to be an issue in setting up a new Service Desk project.  What else can I provide to help us solve what should be a relatively simple set up?

 

10 answers

1 accepted

13 votes
Answer accepted
Peter Hamilton-Harding
Contributor
December 12, 2018

I've had lots of "fun" getting incoming IMAP and outgoing SMTP to work using the one mailbox, finally there. I know I'm not answering every question above, but hope my findings can help. Obviously replace 'fake', 'tenant', and 'domain' with your real ones.

-Must not be a shared mailbox

-Before you do anything in Jira, sign in to the damn mailbox in OWA and make sure it actually works just as a mailbox. Any problems you have at this point are for Microsoft Support/Forums. Don't forget to test both directions internally and externally

-Incoming Mail IMAP settings:
Protocol: SECURE_IMAP
Host Name: outlook.office365.com
Port: 993
Username: fake@tenant.onmicrosoft.com

-Outgoing mail SMTP settings:
From address: fake@domain.com
Protocol: SMTP
Hostname: tenant.mail.protection.outlook.com (replace this with the MX endpoint for your O365 tenant, always ends with "mail.protection.outlook.com")
SMTP Port: 25
TLS: Yes
Username: fake

Matthew Alexander
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2020

I hate to necro this but I've seen other recent posts on this thread and wanted to say that this was the solution for me.  Easy and simple using these configuration settings, thanks!

Like # people like this
Ilia Fonariov August 13, 2020

I'm going to add as well that after migrating to Office 365, we were unable to see Full Name of user who triggered a Jira notification, and this comment helped resolve the issue as well!

We were using

Host name: outlook.office365.com

SMTP Port: 587

 

Emails came in, but just said "JIRA" for all of them. After updating the port to Peter's suggestion above as well as the Hostname, now the emails are displaying the full name of user.

Thanks!

Like # people like this
David Pressley November 24, 2020

We banged our heads against a wall with all possible combinations, and in the end, realized that we were referencing our tenant, when it should have been:

outlook.office65.com
SMTP: 587
username + password
v_tm
Contributor
June 21, 2021

Hey, i also ended up here because of a strange behavior. I managed to get jira to send mails from jira@domain.com. But i want the servicedesk to send it from support@domain.com. When i try to send my queue in the logs it says: 
SMTPSendFailedException: 554 5.2.252 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message

Anyone has solved this? When i set servicedesk to send it from jira@domain.com it works fine but on support@domain.com it refuses to send anything. I tried the following mailservers:

tenant.mail.protection.outlook.com (tenant was my domain though) 
smtp.office365.com
outlook.office365.com

None of them solved the problem. 

3 votes
Allan Libby
Contributor
August 24, 2018

We just solved this by allowing outgoing traffic on port 993 to the outlook ip ranges as listed in this microsoft article:

 

https://docs.microsoft.com/en-us/office365/enterprise/urls-and-ip-address-ranges

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2018

Thanks for sharing here @Allan Libby

Like Dane Lewin likes this
IT-Support COI September 3, 2018

Jack, thanks for your reply. I'll test it soon, I'm currently on holiday.

2 votes
Andy cashen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2020

Newbie here I am just setting our company emails but it says you have to verify your domains in Jira.  Assuming that people with issues had done this ?

0 votes
Vikash Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 27, 2022

Putting it here for your help : we are changing basic authentication to oauth2.0 for Jira ServiceDesk project --> Email setting.

What would be the behavior for this change?

Will it read/process all the emails from the mailbox including older and already processed ones (as we are continuing with the same mailbox only changing the authentication mechanism)?

Or it will only read new emails?

Thanks,

VK

0 votes
robc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 20, 2019

Office 365. Local firewall ports are irrelevant. Office 365 also supports IMAPS out of the box. Since we use SSO and MFA I created an APP password for our service account and we always get Authentication errors. We have used this same setup with other providers without issue.

0 votes
hewi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2019

I had the same problem and none of the answers above helped me.

I verified that my jira server had port 993 access to O365, so that wasn't the issue. The test email from jira went through when the email settings were entered, so I knew that wasn't an issue.

It turned out to be something silly in the scheme of things - under "Global Mail Settings" in the System configuration, "Email puller" and "Email processor" were both turned off.

Within a few minutes of enabling these, the incoming mail was parsed by Jira and added into the queue as I expected.

globalmail.PNG

0 votes
Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 15, 2018

Not all 0365 accounts enable IMAP access.

IT-Support COI August 16, 2018

Hello Matt,thanks for your quick reply. I already checked if IMAP is enabled, it is. And of course I tried POP and SMTPI tried to send a mail via Jira, I get an authentication error. Interesting is the DEBUG

Message at the end:DEBUG SMTP: need username and password for authentication
DEBUG SMTP: protocolConnect returning false, host=outlook.office365.com, user=jira, password=<null>

 

Why "user=jira" and pass "null"?

 

Check my attachemts, I inserted the correct credentials.

 

Here is the complete log:

An error has occurred with sending the test email:
com.atlassian.mail.MailException: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: outlook.office365.com, 25; timeout 10000;
  nested exception is:
    java.net.ConnectException: Verbindungsaufbau abgelehnt

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: need username and password for authentication
DEBUG SMTP: protocolConnect returning false, host=outlook.office365.com, user=jira, password=<null>
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "outlook.office365.com", port 25, isSSL false

outgoing.PNGservicedesk_proejcts_email-request.png

Dawn Fama
Contributor
October 17, 2019

Shouldn't your SMTP be a gateway host on your network, not office365 domain?

I had similar issues connecting JIRA to O365 and it turned out to be a security policy.  When I requested the mailbox to be created, I had to specify I needed it to be imaps (secure IMAP enabled) so they would add the account to the correct exception group.

0 votes
Allan Libby
Contributor
August 7, 2018

Those are the exact settings I have as well.  I am asking our host to make sure port 993 is allowed out to the microsoft IP range.

IT-Support COI August 15, 2018

Same problem here and only with o365. Atlassian plz help!

Allan Libby
Contributor
August 15, 2018

We are still trying to get time with our security officer to make sure traffic on port 993 is being allowed out to the O365 IP ranges.  I'd suggest doing the same to rule that out.  If you do, please let us know if that worked for future generations to be able to solve the problem ;-)

Like Dawn Fama likes this
IT-Support COI September 3, 2018

Allan, thanks for your reply. I'll test it soon, I'm currently on holiday.

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2018

This is working fine for me so a bit perplexed as to why it is not for others. @Bill Kunneke and @Allan Libby did you open a support request w/ Atlassian Support?

Allan Libby
Contributor
August 7, 2018

Not yet, that is the next step.

Bill Kunneke August 7, 2018

I did open a ticket with Atlassian Support and it didn't get resolved.  The funny thing is, we carved out all this time to test Service Desk and never in my wildest dreams would I have thought that connecting to a mail service would take more than 5 minutes.  Hours of work over the last few months though has not gotten me a single step closer.  Someone on the team hacked a work around, it'll have to do but it baffles me why Office 365 email would be so problematic.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2018

If memory serves it only took 5m for us. Define a new O365 email, enter it into the project emails configuration and attach to a request type. I will look at how the email is configured in O365 and comment back here. If possible could you post screenshots of your project config email screen?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2018

Guys,

here is what i have set up on my config and as I said it works fine. Bill, as you mentioned it needs to be a real email user and not shared which is what you have done. If these settings don't work I would definitely seek Atlassian's assistance.

 

Set_up_email_channel_-_JIRA.jpg

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2018

it sure seems that if you guys have it set up as above it would be something on the Outlook side TBH.

Bill Kunneke August 8, 2018

FWIW, we tried these settings and tried them again.  Still not working.  Like I said, we've moved on but maybe this will help someone else.  Thanks for all the help.

Allan Libby
Contributor
August 8, 2018

Bill, did you check firewall settings?  I am doing that tonight (takes a while for our wheels to turn here) to double check.

Bill Kunneke August 8, 2018

I'm cutting my losses, we spent a LOT of time on this and I can't afford to lose any more.  I tried the config (again) that Jack provided even though I knew we had tried these settings before.  As for the firewall rules, it's a lot of work for me to engage someone in IT to check the firewall and it would be a mountain of paperwork to get it changed if that was the issue.  Given we have a hosted solution, I'm not even sure we can control this.  We've moved on, disappointed to say the least that we spent this much time on something that should just work right out of the box.  Again, thanks for the attempts.

Allan Libby
Contributor
August 8, 2018

If it was a firewall issue it's not Jira's fault, but your organization's policies (currently I am fighting mine too).  I'll update this thread after we get our firewall settings changed and I test it out again.

Like Dawn Fama likes this
0 votes
Rodrigo Baldasso
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2018

Hi Bill,

Those messages are a bit generic for me to give you a straightforward answer, but, it is likely an issue with the SSL certificate. Are you using a custom domain or Microsoft's Office 365 default url when trying to set up the mailbox?

-Rodrigo.

Bill Kunneke June 28, 2018

The mail server is outlook.office365.com.  

Allan Libby
Contributor
August 7, 2018

I am also having the same issue.  Jira only says 'Unfortunately JIRA couldn't connect to the mail server. Here is what the mail server said: "Connection timed out: connect"'

Bill Kunneke August 7, 2018

We finally gave up on it, couldn't get help here or on the web.  My suggestion was to stay on Zendesk but ultimately we hacked around the issue by creating a GMail account that auto forwards to the Microsoft account.  It's ugly, but it works.  Best of luck.

Allan Libby
Contributor
August 7, 2018

Darn.  Neither of those are an option for us :-(  I saw on another ticket on here that someone got it to work, so I know its possible.  Thanks for responding!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events