I created a auto flow to send mail alert when has new Devices onboard Microsoft Windows MDATP, refer link: https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/onboarding-notification?vi...
But at 4 step "Apply_to_each" has error "Action 'Apply_to_each' failed".
Unable to process template language expressions for action 'Apply_to_each' at line '0' and column '0': 'The number of foreach items limit exceeded for action 'Apply_to_each': maximum '5000' and actual '5794'.'.
Please help me fix.
Not sure but with different licenses you can get more items from get items.
Try some workarounds:
I hope these steps help.
Hi @Sundeep_Malik ,
Thanks for your support,
I am new member, i tried follow 1 method but my license cannot change to 6000.
with 3nd method, how to create 2 get items.
just use them in parallel.
Click the plus icon.
So, in the first in top count give 5000, in the second get items in order by, do it in descending order and in top count give rest of the items.
[My bad there is not skip option in this, it was there in list rows in a table for onedrive excel.]
I think your method is great!
I'm just adding a little addition to your method (your method is probably the most perfect).
You can display the ID column in the SharePoint list and turn on the count (so you can see how many items are in the list to avoid getting duplicates in two get items in parallel.)
Also, as Sundeep_Malik said, upgrading your license is a great way too!
Apply to each loops are limited to a maximum of 5,000 items if you are on the Office 365 seeded license or Power Automate free. The per user license allows loops of up to 100,000 items. If you need to process more than 5,000 items in a loop you should upgrade to a paid license. This article outlines the limits.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!