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
fchopo
Super User
Super User

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

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

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.
fchopo
Super User
Super User

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!
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

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.
Jelmer_0454312
Frequent Visitor

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.............?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,500)