cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CYJ
Helper II
Helper II

Getting Sharepoint Group details using Microsoft Flow and storing them into collection in powerapps

Hello everyone, i am trying to get the users' email and name from sharepoint group using Microsoft Flow and store them into  array before passing it to powerapps. I am planning to have a collection of the particular array in powerapps.

 

How do i continue the flow from here?

 

portal.png

I am trying to get the array value from the sharepoint group in Microsoft Flow before passing it to powerapps.

 

user2.PNG

 

Once i have passed the array value from flow to powerapps, i want to store them into a collection

collection.PNG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @CYJ :

I did a test with reference to your method and got the correct result:

My method is to integrate the results into a string and pass it to powerapps, then write a formula in powerapps to reformat the string into a table.

1\My flow('PowerApp->SendanHTTPrequesttoSharePoint')

1.JPG

2\Add a button and set it's OnSelect preperty to:

 

Clear(thetable);  /*thetable is my custom collection*/
ForAll(
    Split(
        'PowerApp->SendanHTTPrequesttoSharePoint'.Run().groupmember,
        "##"
    ),
    Collect(
        thetable,
        {
            email: First(
                Split(
                    Result,
                    ";;"
                )
            ).Result,
            name: Last(
                FirstN(
                    Split(
                        Result,
                        ";;"
                    ),
                    2
                )
            ).Result
        }
    )
)

 

 3\Add a table

Items:

 

thetable

 

3.JPG

Best Regards,

Bof

View solution in original post

7 REPLIES 7
CYJ
Helper II
Helper II

I think i am getting close here. Here is my current workflow but i am getting null values in powerapps.

 

value.PNG

value2.PNG

 

In powerapps, i am receiving null values which i have set it to a text.

null.PNG

v-bofeng-msft
Community Support
Community Support

Hi @CYJ :

I did a test with reference to your method and got the correct result:

My method is to integrate the results into a string and pass it to powerapps, then write a formula in powerapps to reformat the string into a table.

1\My flow('PowerApp->SendanHTTPrequesttoSharePoint')

1.JPG

2\Add a button and set it's OnSelect preperty to:

 

Clear(thetable);  /*thetable is my custom collection*/
ForAll(
    Split(
        'PowerApp->SendanHTTPrequesttoSharePoint'.Run().groupmember,
        "##"
    ),
    Collect(
        thetable,
        {
            email: First(
                Split(
                    Result,
                    ";;"
                )
            ).Result,
            name: Last(
                FirstN(
                    Split(
                        Result,
                        ";;"
                    ),
                    2
                )
            ).Result
        }
    )
)

 

 3\Add a table

Items:

 

thetable

 

3.JPG

Best Regards,

Bof

View solution in original post

Hi @v-bofeng-msft ,

 

I just tested your method. Unfortunately, i encountered this error.

 

test1.PNG

v-bofeng-msft
Community Support
Community Support

Hi @CYJ :

You don't need to add Applay to each action manually.

I recorded a video for your reference:

14.gif

Best Regards,

Bof

Hi @v-bofeng-msft 

 

 

I think the error occurs due to the array value i am receiving from Parse Json. I am not so sure.

 

 

test3.PNG

 

 
v-bofeng-msft
Community Support
Community Support

Hi @CYJ :

This is my setting:

1.JPG

 

{
    "type": "object",
    "properties": {
        "d": {
            "type": "object",
            "properties": {
                "results": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "__metadata": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "uri": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    }
                                }
                            },
                            "Alerts": {
                                "type": "object",
                                "properties": {
                                    "__deferred": {
                                        "type": "object",
                                        "properties": {
                                            "uri": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                }
                            },
                            "Groups": {
                                "type": "object",
                                "properties": {
                                    "__deferred": {
                                        "type": "object",
                                        "properties": {
                                            "uri": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                }
                            },
                            "Id": {
                                "type": "integer"
                            },
                            "IsHiddenInUI": {
                                "type": "boolean"
                            },
                            "LoginName": {
                                "type": "string"
                            },
                            "Title": {
                                "type": "string"
                            },
                            "PrincipalType": {
                                "type": "integer"
                            },
                            "Email": {
                                "type": "string"
                            },
                            "Expiration": {
                                "type": "string"
                            },
                            "IsEmailAuthenticationGuestUser": {
                                "type": "boolean"
                            },
                            "IsShareByEmailGuestUser": {
                                "type": "boolean"
                            },
                            "IsSiteAdmin": {
                                "type": "boolean"
                            },
                            "UserId": {
                                "type": "object",
                                "properties": {
                                    "__metadata": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "NameId": {
                                        "type": "string"
                                    },
                                    "NameIdIssuer": {
                                        "type": "string"
                                    }
                                }
                            },
                            "UserPrincipalName": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "__metadata",
                            "Alerts",
                            "Groups",
                            "Id",
                            "IsHiddenInUI",
                            "LoginName",
                            "Title",
                            "PrincipalType",
                            "Email",
                            "Expiration",
                            "IsEmailAuthenticationGuestUser",
                            "IsShareByEmailGuestUser",
                            "IsSiteAdmin",
                            "UserId",
                            "UserPrincipalName"
                        ]
                    }
                }
            }
        }
    }
}

 

 Best Regards,

Bof

Hi @v-bofeng-msft ,

 

 

It is working now. I redo the whole flow again. Maybe i have inserted a wrong value or output somewhere in the flow. Thanks

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,064)