1) I have SharePoint list that is used to store person name, email etc.
2) I have created a flow when an item is created or modified, I want to give that person access to Azure AD. Please have a look at my flow. The flow works perfectly until I modified multiple people at once and save the list. What can I add right after the When an item is ... so that it can handle each modified item one by one
Solved! Go to Solution.
Hello @Anonymous
Why don't you change your trigger and use "When an item is created" ? As I understand, you want to give permissions to Azure AD to new members, but you don't need to do it for existing ones. Am I right?
Regards,
Ferran
When an item is Created or modified is a Trigger. You really can't use a trigger in the middle of another flow. Triggers are used to initiate flows. The solution is to remove that trigger and use a Get Item or Get items action instead to retrieve the items to be modified.
Hello @Anonymous
Why don't you change your trigger and use "When an item is created" ? As I understand, you want to give permissions to Azure AD to new members, but you don't need to do it for existing ones. Am I right?
Regards,
Ferran
Hi thanks for your reply, I am using the trigger in the beginning.
Second pic - the flow
first pic - the error that takes places
Sorry about the order of the picture
Sorry, my misread. So if that is the case then the issue is that you are changing the group membership while you are doing a loop on the group membership. So the group membership expands as you are trying to loop through it. You need to split that loop into two loops. In the first loop find the users who aren't members of the group the way you do now, but instead of adding them to the group there add their IDs to an array variable. Then once you have all the missing users in the array run another loop where you process the array and add each member to the group.
Still you did not get an answer to your question. If you do not change the trigger and keep the when an item is created or modified then what.............?