I created a test where i have an array of users and then i parse the array and use it to populate a list in sharepoint. This works perfectly, next i wanted to use graph api to pull the array of users from azure ad and the result is as follows:
Solved! Go to Solution.
For those of you who might be interested I have found the solution to this issue, basically it is to first parse the JSON result from the graph api, then you need to compose or call the array section into a loop and parse that section one more time and that is it data from graph api request is now usable. Screenshots below to support this method:
Hey there. This might be kind of "hacky", but you could use a split() to separate the whole thing on the phrase, "value". It might look something like this:
split(<GraphAPIBody>, '"value":')[1]
Not totally sure if that will work, but you'll replace the <graphAPIBody> bit with the dynamic output of that step. Note that "value" will also have single quotes around it and that I also included the colon. This splits the whole thing in two, and the [1] at the end says that you're only interested in the second half.
Keep us posted.
-Ed
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
I am fairly new to this so can you please guide as to where in my flow this would go, i tried this but it did not work:
split({
"requests": [
{
"url": "/users",
"method": "GET",
"id": 1,
"headers": {
"Content-Type": "application/json"
}
}
]
}, '"value":')[1]
My Flow is as follows
Hi there, sorry for the delay. So the thing to try first is to put a compose action after your HTTP, but before your parse JSON.
Inside the compose, use that split that I listed above in the expression box: split(<Batch Body>, '"value":')[1]
<Batch Body> would be the dynamic value output of your HTTP action, just like you have it in your ParseJson step. So you would open the expression editor, type out 'split(' (without the quotes), click over to dynamic values and click on the body, the type the rest of the expression from the comma on.
Hopefully that makes sense. Let me know if you get stuck.
-Ed
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
Sounds Great, I will give it a try first thing monday morning.
Thanks will let you know how it goes.
Hi Ed,
I have tried the below as instructed but to no avail results are below:
Configuration Option 1, Option 2 and Option 3:
Option 1 - trying to parse without splitting
Option 2 - trying to split document using expression (requires an input of type string not object so i need to somehow convert the object to string
Option 3 - Wrote code directly to compose (does not work at all just concatenates the information added)
In the mean time I managed to created a working solution for what i required which is as follows below, but i would still like to troubleshoot the above issue:
For those of you who might be interested I have found the solution to this issue, basically it is to first parse the JSON result from the graph api, then you need to compose or call the array section into a loop and parse that section one more time and that is it data from graph api request is now usable. Screenshots below to support this method:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
72 | |
26 | |
16 | |
16 | |
15 |
User | Count |
---|---|
145 | |
45 | |
44 | |
33 | |
30 |