logo

NJP

Integration Hub | Set up the Jira spoke for Jira Cloud with OAuth 2.0 authentication

Import · Jul 03, 2024 · video

Let's set up the Jira spoke for Jira Cloud using OAuth 2.0 authentication in our ServiceNow instance. First log in to the Atlassian developer console to create a new OAuth 2.0 Integration app. Provide a name for the integration and select create. This will generate an app ID. Next, navigate to the authorization section. Add a callback URL that points to the ServiceNow instance and save. Now go to settings under authentication details, Copy the client ID and client secret. Additionally, we need to copy the cloud ID from the Atlassian admin URL. We'll need them later. The final step in Jira is to set shared data permissions using scopes. This includes classic scopes and granular scopes, which you can find listed in the ServiceNow documentation. Navigate to the permissions tab and select the necessary scopes. First, we'll select the classic scopes. Then we'll select the granular scopes. Now, let's configure the integration, In the ServiceNow instance. Navigate to Application Registry. We'll create a new registry for our Jira spoke and select Connect to a third party OAuth provider. Now let's fill out the form. Give the registry a name, paste the client ID and client secret that was copied earlier. Select the default grant type in the dropdown menu. We’ll select Authorization Code. Now add three URLs authorization token and refresh token. These three links can be found in the ServiceNow documentation. Now we need to enter the scope records we previously gave permission for in Jira. Go to the OAuth entity Scopes tab. Type the name and OAuth scope for each scope record. Then save the registry. We've created the registry for our Jira spoke to confirm we can go to the OAuth entity profiles tab and see there is one default entry. If we open the profile record, the scopes we entered are listed. Next, let's create a Jira credential. Navigate to credentials. Select new and from the types of credentials list. Choose OAuth 2.0 credentials. Name the credential and in the OAuth entity field. Search for and choose the OAuth entity profile we created earlier. Then save The notification tells us that we need to get an OAuth token. For this we need to create the connection. Then come back and update this record. To create the connection. Navigate to connection and credential aliases and select the Jira record Under the Connections tab, Select New Name the Connection and in the credential field, search for and choose the credential we created earlier in the connection URL field. Enter the Jira instance URL. The URL format can be found in the ServiceNow documentation. Then update the link with the cloud ID we copied earlier. Confirm that the server type is set to cloud and submit to get an OAuth token, we'll go back to the credential we created. Select the related link. Get OAuth Token and accept the authentication request in the pop up window. The token is active and we can see the assigned expiration date. The set up of Jira spoke for Jira Cloud with OAuth 2.0 authentication is complete. To learn more, see our product documentation or knowledge base or ask a question in the ServiceNow community.

View original source

https://www.youtube.com/watch?v=a3YfG2Ic9Oc