Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Assets module of JSM provides amazing features. Two of the useful capabilities are being able to define attributes as a “Jira User” type and/or “Jira Group”. On this page, we will provide 2 different methods to map Azure AD users with Jira Users and Jira Groups in JSM Assets.

...

The example use case could be as follows:

Use Case:

As an Asset and Configuration Manager, I would like to keep track of all the Microsoft Entra ID (a.k.a. Azure AD) User records and extend them by adding their Jira User and Jira Groups information.

The following are just 2 possible examples to fulfill the use case.

...

Automation Component

Configuration

Explanation

Select the rule trigger for “Scheduled”. Define the schedule period. I.e. every day at 3 AM GMT or hourly.

Select the the Users in the “Azure AD” object schema which don’t have the Jira User defined. Use the AQL:

objecttype = Users and "Jira User" is empty

Search for the user’s “Jira User” record using the Jira Rest API and get the accountId.

Send a web request to Jira API using the URL:

https://your-site-name.atlassian.net/rest/api/2/user/search?query={{object."E-mail Address"}}

The hidden part in the Authorization header needs to be in a format like:

Basic Y29udGFwgpxwaW8uc29mdHdhcyyyyWxNZmh4SVdUeFU1YWtwSHJDljI5xxxx

Please note that your Email Address and API Token need to be Base64 encoded as explained in the following document.

https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/#supply-basic-auth-headers

Make sure that you found only one record.

Check {{webResponse.body.size}}

  1. From this point please follow Scenario 1 or 2 described at the bottom of this page to complete your automation rule.

Info

Branch on AQL has a limit on the number of Objects filtered. For example, if you have more than 50 objects rersulting resulting in your AQL, only first 50 will be processed.

...