web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / (sorry) Trivial Post! ...
Power Automate
Unanswered

(sorry) Trivial Post! - Need this array value as a string

(0) ShareShare
ReportReport
Posted on by

I call a http request to GraphAPI and return a list of the security groups a user is a member off. I only need to select the group type and the group ID. 

The output is this:

{
"body": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects(groupTypes,id)",
"value": [
{
"@odata.type": "#microsoft.graph.group",
"groupTypes": [
"DynamicMembership"
],
"id": "badc0e9e-d736-4534-b2c2-7aed3280a035"
},
{
"@odata.type": "#microsoft.graph.group",
"groupTypes": [
"Unified"
],
"id": "14a7c19e-db29-4e5c-82ec-657686b5f27d"
},
{
"@odata.type": "#microsoft.graph.group",
"groupTypes": [
"Unified"
],
"id": "1b8d728a-bf51-4ddd-b167-9e945f734d77"
}
]
}
}

 

If I PARSE the output on body, I can return the ID as a string in a compose activity. What throws me is groupTypes returns in a single array 

[

"DynamicMembership"

]

 

How do I go about retrieving the string DynamicMembership please?

 

 

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Nothing is ever trivial when it comes to flow...

     

    So you're only asking how to get the string out of that last thing you posted?

     

    variables('arrGroup')[0]
     
    (Where variables('arrGroup') is whatever is holding your single item there.) 

    The [0] just says "take the thing that's at an index of 0 in this array."
     
    You could also use first(variables('arrGroup'))
     
    Whatever floats your boat.
  • LW-28112008-0 Profile Picture
    on at

    Thank you! 

    Your reply pointed me in the right direction and I sorted it..

    regards

  • LW-28112008-0 Profile Picture
    on at

    Still doesn't work 100%, only the first ([0]) is being returned. 

    Maybe I'll expand the question and ask, how do I parse the following to get the ID and the GroupType only. 

     

    {
     "body": {
     "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects(groupTypes,id)",
     "value": [
     {
     "@odata.type": "#microsoft.graph.group",
     "groupTypes": [
     "DynamicMembership"
     ],
     "id": "badc0e9e-d736-4534-b2c2-7aed3280a035"
     },
     {
     "@odata.type": "#microsoft.graph.group",
     "groupTypes": [
     "Unified"
     ],
     "id": "14a7c19e-db29-4e5c-82ec-657686b5f27d"
     },
     {
     "@odata.type": "#microsoft.graph.group",
     "groupTypes": [
     "Unified"
     ],
     "id": "1b8d728a-bf51-4ddd-b167-9e945f734d77"
     }
     ]
     }
    }
    

     

  • VictorIvanidze Profile Picture
    13,079 on at

    Use Select action.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard