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?
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?
Thank you!
Your reply pointed me in the right direction and I sorted it..
regards
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"
}
]
}
}
Use Select action.
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 |
---|---|
70 | |
24 | |
18 | |
16 | |
13 |
User | Count |
---|---|
134 | |
43 | |
32 | |
32 | |
29 |