After version 4.2.0 of the Helpdesk plugin a new feature was added - OAuth authentication for MS Office 365. In this guide, we will teach you how to configure the plugin on this point.
- Creating OAuth App
- Set up the Helpdesk plugin for incoming mail
- Automation of receiving emails
- Outgoing mail settings
- Video demonstration
Please login to the site of Microsoft Azure. Then select Azure Active Directory.
Then on the left sidebar, please click on App registrations.
Afterward, just select New registration.
Now, fill in the below 4 fields:
- Supported Account Type
- Redirect URI (URL) - type "Web"
- Redirect URI (URL)
The Redirect URI (URL) is taken from Administration - Plugins - Helpdesk - Configuration - OAuth settings tab.
The ready app (after saving) looks like this.
Now, copy the Application (client) ID via the button.
Please paste it into the Helpdesk configuration field.
The next step that we have to do is to create our secret value. It is going to happen via the Add a certificate or secret button.
Click on the New Client Secret.
Then on the right side, a new window will pop up. Please fill in the 2 fields in accordance with your needs:
Now, please copy the Value via the button for copying.
And paste it into the Client secret value field of the Helpdesk settings.
We have almost done our job. Now, we need to set up the Helpdesk itself. Please go to the Helpdesk project you would like to configure and go to the settings tab and fill in the below 3 fields for the incoming mail settings:
- Protocol - Microsoft Outlook
Then click on the Authorize button that is located below the Password button. You will be redirected again to the Microsoft site to log in again. Afterward, a new window will come to you Let this app access your info?. Please click Yes.
If everything is successful, then the Authentication section will come to a green sign. Also, three new options will come as well:
- Mail folder
- Move on success
- Move on failure
And now we test our configuration and see that everything is fine. The emails are received.
And our first received mail.
When you successfully set up the OAuth for your project then you could configure the receiving of the emails to be automatic. It could be done in 2 ways:
bundle exec rake redmine:email:helpdesk:receive RAILS_ENV=production
wget -O - http://127.0.0.1/helpdesk_mailer/get_mail?key=******************
More detailed information about the automatic receiving configurations could be checked in this article.
Important: The IMAP method isn't available for OAuth.
- Disable the default settings
- Select the Microsoft Outlook protocol from the drop-down menu
- Set your outlook email address to the From field
Please check the below picture to make the situation more clear.
So, when we sent a reply to a client via the Helpdesk ticket interface.
He will successfully receive it.