cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

HTTP request to Azure AD - removing text from body output after Graph query

Hi all, would appreciate any ideas on this:

 

            {

  "value": [
    {
      "id""aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee"
    }
  ]
}
 
Is there an easy way to extract./transform that output to retain only "id" value itself? In this case : "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee". Thanks!
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hi @vbvbvb 

 

Yes. Can you share a screenshot of your flow setup so far? 

 

After the http action, you can add a Parse JSON action and in that pass the body of the HTTp action output and for the schema, select generate from sample payload and paste the outputs returned in the http action from a previous run to generate the schema. Add a compose action after that and you should be able to see the id as a part of the dynamic content. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Solution Sage
Solution Sage

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hello @vbvbvb 

You could use "Parse JSON" action. Have a look at this sample:

parseJson.png

 1) In the "Parse Json" action, you could generate the schema from a sample payload (the json code you showed).

2) After that, we can read the Id value and store it in variable.

 

Hope it helps!

Ferran

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User
Dual Super User

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hi @vbvbvb 

 

Yes. Can you share a screenshot of your flow setup so far? 

 

After the http action, you can add a Parse JSON action and in that pass the body of the HTTp action output and for the schema, select generate from sample payload and paste the outputs returned in the http action from a previous run to generate the schema. Add a compose action after that and you should be able to see the id as a part of the dynamic content. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Solution Sage
Solution Sage

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hello @vbvbvb 

You could use "Parse JSON" action. Have a look at this sample:

parseJson.png

 1) In the "Parse Json" action, you could generate the schema from a sample payload (the json code you showed).

2) After that, we can read the Id value and store it in variable.

 

Hope it helps!

Ferran

View solution in original post

Highlighted
Microsoft
Microsoft

Re: HTTP request to Azure AD - removing text from body output after Graph query

Thanks, this looks very useful - but quick question, how did you managed to use Initalise Variable inside Apply to each control?

Highlighted
Dual Super User
Dual Super User

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hi @vbvbvb 

 

You cannot use intialize variable in the apply to each. The flow was not saved in the screenshot and I believe was just to show how to access the required item. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Microsoft
Microsoft

Re: HTTP request to Azure AD - removing text from body output after Graph query

Ok, it makes sense now - Parse JSON does break each value down into  dynamic value. Great stuff, thanks @fchopo and @yashag2255 .

Highlighted
Community Support
Community Support

Re: HTTP request to Azure AD - removing text from body output after Graph query

Hi,

 

It looks like you were able to resolve your issue from a few very helpful suggestions from our community. There is a great article below; if you would like to learn more on Json's.

 

https://spmaestro.com/handling-json-in-microsoft-flow/

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,665)