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

Hi @v-bofeng-msft ,

 

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

 

test1.PNG

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

 

 

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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