cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
myslinsky
Regular Visitor

Extracting @odata.count from Graph Result

I need to query Graph for a count of records but don't care the actual records.   Testing in postman confirms that adding $count=true&$top=0 to the end of the query returns just the count but I'm not sure how best to extract @odata.count into my Flow so that it can be used downstream.  Any recommendations?

 

Cheers

Chad

4 REPLIES 4
Krishna92
Microsoft
Microsoft

@myslinsky 

 

Please try to use PARSE JSON action, this will help you to process the output information coming from previous step and you can select specific value that you want.

 

Using PARSE JSON you can extract Odata Count from the output and can use it in next actions.

 

If this information helps you with resolution, please consider giving a thumbs up and mark the solution as resolved.

It doesn't appear that @odata.count is made available in the BODY dynamic content coming off the HTTP action in flow but that data is available in the response received in Postman.

 

Flow output from HTTP action...

valueonly_flow.PNG

 

Postman Response...

odataandvalue_postman.PNG

 

Is @odata.count unavailable or is there some voodoo required to get access to the value?

 

Chad

russrimm
Microsoft
Microsoft

Check your json schema, it's probably excluding the @odata.count

VictorIvanidze
Memorable Member
Memorable Member

1) use ?$top=1&$count=true in the query

2) body('Invoke_an_HTTP_request')['@odata.count']

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (56,766)