I am currently trying to build a flow which will receive all departments from specific users in my organization.
I have a SP-List with ~600 users filled with UPN.
In my PowerAutomate I load the UPN into an array and try to get the department back but I can not save my Flow with following expression:
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Get_user_profile_(V2)' at line '1 and column '2612' is invalid. Action 'For_each' must be a parent 'foreach' scope of action 'Get_user_profile_(V2)' to be referenced by 'repeatItems' or 'items' functions.'.'.
My Flow looks currently like this: (Picture: Flow.png)
My Users Array Input looks like:
[
"John.Doe@company.com",
"Mark.Smith@company.com",
"barb.Wu@company.com"
]
My target is to have a different SP-List with only the departments of the specified users.
if you need more information I am happy to share!
Thanks for the help in advance!
Marco
EDIT
-------
Seems like the pictures are not showing up in my post. I attached them now