I am working on a logic app that will create users in third party applications based on AAD group membership. To avoid issues when the group has more than 999 users I have implemented paging. I first get the first 50 users, and a NextLink that I call to get the next 50. This loop runs fine. Snippet of logic app
When no more nextlink is found, the loop exits. During the loop iterations, I need to store the user information (first name, lastname, UPN etc) in an array so i can process everyone after running through the loop. I have tried running the Union expression as follows:
union(variables('AllUserInfoArray'),body('HTTP_-_Request_My_Group_Name_group_members')['value'])
But this does not add the user data to the AllUserInfoArray, it creates a new array (Compose->Outputs). How do I add all userdata into the AllUserInfoArray array so I can loop through all users once all user info has been gathered?