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.
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:
Kind regards,
Bill
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll want to use {{webResponse.body.accountId}} smart value to get the account id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see. If you can remove sensitive data and share an example of the body, It would be easier for us to help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.