cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Flow is throwing error when multiple items are modified in a sharepoint list

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 onead2.PNG

ad.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

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

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

4 REPLIES 4
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User II
Super User II

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

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Anonymous
Not applicable

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

Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (21,669)