Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

In jira automation rule, I am unable to extract a accountid attribute from "SendWebRequest" response

Chandrashekhar Maruti Badar June 16, 2025

Through "send Web Request" action in Jira Automation, I am accessing a AzureAD provisioning API's for user details, I can see "{{webResponse.body}} does give an output with user details, I want to extract a specific attribute  from that output like atlassianAccountId from the response body.

I tried all the possible smart values with urlEncode, jsonEncode, but unable to parse the atlassianAccountId 

Ex . {{webResponse.body."urn:scim:schemas:extension:atlassian-external:1.0".atlassianAccountId}}

Any help is much appreciated.

4 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2025

Hi @Chandrashekhar Maruti Badar 

Depending upon the endpoint and its response, you may not be able to parse the response as JSON (or with dot-notation for attributes) in a rule.  Based on what you describe, perhaps this response is plain text.

I recommend experimenting:

  • write the entire response to the audit log to confirm the structure
  • for the attribute needed, try to access it with dot-notation, writing that to the log
  • if that does not work, for the areas of interest in the response, try adding the function jsonStringToObject() to convert to JSON for accessing the attributes
  • if that does not help, try other text functions, such as match() with a regular expression to extract the values

Kind regards,
Bill

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2025

Hi @Chandrashekhar Maruti Badar 

Can you provide the output of the web response here, this i=to see how the output is presented.

This could help us members to possibly help you out.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2025

Does the webresponse body have any accountid information that can be related to the Atlassian Account ID?

I don't think so as you are accessing the Azure AD API

Please provide an example of the webresponse.

0 votes
Marcel Hager
Contributor
June 16, 2025

You'll want to use {{webResponse.body.accountId}} smart value to get the account id

Chandrashekhar Maruti Badar June 16, 2025

Thank you for the response. I did try it earlier and now as well, no output for this smart value.

It seems, jira does not provide a a JSON output for 'send web request' action even if header is been added for JSON, and hence not able to parse the expected output

0 votes
Deivid Araujo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2025

Hi Chandrashekhar,

I don’t have experience with AzureAD specifically, but based on the information you provided, the first thing I would do is log the entire {{webResponse.body}} using the Log action block in Jira Automation. That way, you can see all the attributes returned in the API response.

Alternatively, you can use tools like Postman to better visualize the results.

Chandrashekhar Maruti Badar June 16, 2025

@Deivid Araujo thank you for the response. I do get the response as a whole body, but can't parse the specific attribute like manager from the body with smart values.

I want to parse, manager value, but this is not working, and this manager value I need to in another web request to filter the user record and parse 'atlassianAccountId" 

Deivid Araujo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2025

I see. If you can remove sensitive data and share an example of the body, It would be easier for us to help 

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events