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 III
Dual Super User III

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
Super User II
Super User II

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

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

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
Super User II
Super User II

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

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

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 III
Dual Super User III

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
Microsoft
Microsoft

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,604)