如何使用逻辑应用程序将所有Azure AD用户组成员存储在阵列中 [英] How to store all Azure AD user group members in an array using a logic app

查看:52
本文介绍了如何使用逻辑应用程序将所有Azure AD用户组成员存储在阵列中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个逻辑应用程序,它将基于AAD组成员身份在第三方应用程序中创建用户.为了避免该组有999个以上的用户时出现问题,我实施了分页.我首先获得了前50个用户,然后调用了NextLink获得了下50个用户.此循环运行良好. 逻辑应用程序的片段

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

找不到更多的nextlink时,循环退出.在循环迭代期间,我需要将用户信息(名字,姓氏,UPN等)存储在数组中,以便在运行循环后可以处理所有人.我尝试如下运行 Union 表达式: union(variables('AllUserInfoArray'),body('HTTP_-_Request_My_Group_Name_group_members')['value']) 但这不会将用户数据添加到AllUserInfoArray中,而是创建一个新数组(Compose-> Outputs).如何将所有用户数据添加到AllUserInfoArray数组中,以便一旦收集了所有用户信息后就可以遍历所有用户?

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?

推荐答案

根据对问题的描述,您所关心的是"Compose"操作中的"union"创建了一个包含两个collections(array)的新数组.但是为什么不将HTTP请求中的数组附加到数组"AllUserInfoArray".但是,为什么不在"Compose"之后创建一个操作,以将变量"AllUserInfoArray"设置为"Compose"的输出值.然后,我们可以再次进行联合以在下一个循环中修改"AllUserInfoArray".

According to the description of your problem, your concern is the "union" in "Compose" action creates a new array which contains both of the collections(array) but why not append the array from http request to the array "AllUserInfoArray". But why not create an action after the "Compose" to set the variable "AllUserInfoArray" with output value of the "Compose". And then we can do the union again to modify "AllUserInfoArray" in the next loop.

这篇关于如何使用逻辑应用程序将所有Azure AD用户组成员存储在阵列中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆