Hi,
I need help with the following situation.
After the user created an issue in Jira, In the create PostFunction I need to create a script (ScriptRunner) that brings the logged-in user information "Manager Hierarchy Details" that is registered in Azure AD and copies them in custom fields, for example, "Manager 1", "Manager 2", "Manager 3".
We tested if this is possible via REST API in Postman and we succeeded in getting the logged-in user "Manager Hierarchy Details". To do this we need to generate a token to access the Microsoft Graph API.
I believe this is possible in ScriptRunner and appreciate the assistance in what is lacking in my script below
Hi Mark,
I can confirm that it is possible to call external APIs with ScriptRunner for Jira Cloud if the external API provides a rest API.
We have an example in our documentation page here which shows how to interact with the external slack API, and this can be used as a guide to see what syntax to use to call external APIs from ScriptRunner for Jira Cloud.
Also, on this documentation page, we have many examples of how to set different custom field types that may be useful to your requirements.
Also, to let you know, we provide the Script Variables feature, which allows you to store tokens encrypted and reference them in scripts so you do not have to hard code these as plain text in the scripts.
If you need assistance with using the third-party API, we would advise contacting the vendor who makes these APIs to ask them to assist with the API payload structure that the API requires.
I hope this information helps.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.