How can I enable OAuth 2.0 in Jira so that I can create tickets from incoming email?

Problem:

How can I enable OAuth 2.0 in Jira so that I can create tickets from incoming email?

Solution:

Log in as a user with the JIRA System Administrators global permission.

Navigate to Administration > System > OAuth 2.0

Click on Add new integration

At the “Service provider”, select Microsoft

Click on Copy at the Redirect URL field

Let’s login to “https://portal.azure.com/”

Click on App registrations

Click on New registration

Let’s pickup a friendly name so it will be easier to identify

Under the “Supported account types” section, let’s choose “Accounts in any organizational directory (Any Azure AD directory – Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)”
Under the “Redirect URI” section, let’s pickup Web and insert the URL from step #5 above

Click on Register

Click on API permissions

Click on Add a permission

Click on Microsoft Graph

Select Delegated permissions

Let’s select the following permissions:
OpenId permissions: offline_access
IMAP: IMAP.AccessAsUser.All
POP: POP.AccessAsUser.All

Click on Add permissions

Click on Grant admin consent for …

Click on Certificates & secrets

Click on New client secret

Choose a description and expiration date

Take note of the Value generated (this will be used as the “Client secret” at Jira)

Click on Overview

Take note of the Application (client) ID (this will be used as the “Client ID” at Jira)

Let’s go back to Jira and complete the configuration by inserting the following details:
Client ID (from step #25 above)
Client secret (from step #23 above)
Scopes: “https://outlook.office.com/IMAP.AccessAsUser.All”, “https://outlook.office.com/POP.AccessAsUser.All” and “offline_access”

Click on Save

Test the connection

If the connection was successful, please proceed

Navigate to Administration System & Incoming Mail

Click on Add mail server

At the “Service Provider” field, let’s pick up Microsoft Exchange Online / Outlook (IMAP)

At the “Username” field, insert the email address being used by Jira

At the “Authentication method” field, select the new server created under the OAuth 2.0 menu

Click on Authorize

Click on Test Connection

Click on Save

 

Leave a Reply

Your email address will not be published. Required fields are marked *