It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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?

 

7 answers

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

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 Community Leader Aug 24, 2018

Thanks for sharing here @Allan Libby

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

0 votes
Baldasso Atlassian Team Jun 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.

The mail server is outlook.office365.com.  

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"'

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.

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!

0 votes
Jack Community Leader Aug 07, 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?

Not yet, that is the next step.

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 Community Leader Aug 07, 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 Community Leader Aug 07, 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 Community Leader Aug 07, 2018

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

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.

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

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.

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

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.

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

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

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

0 votes

Not all 0365 accounts enable IMAP access.

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

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Service Desk

Tell us how you've implemented Change Management

Hello Community 👋, I'm a product manager at Atlassian, looking at improving change management capabilities across our products. In particular, we're looking at bridging the gap between Dev & ...

1,062 views 3 13
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you