Skip to main content

Hello,

 

I am having an issue with a workflow I have built. I have a list that captures the user inputting the data automatically. When the user selects the save button, a workflow runs against Active Directory to go out and find their manager and save it to a column on the list. 

 

What I am trying to do is run a site level workflow that will loop through each line item and update their manager on a daily basis, in the event their manager changes. 

 

The list has a column called employee status, which is a choice column. The choices are "Active" and "Terminated". I only want to run the site level workflow against the "Active" Employees. 

 

In the past I have used the "query AD profile" action and am able to successfully resolve managers from Active Directory. What I cannot figure out is a loop function that collect all the employees with a status of "Active" and have the loop update the list accordingly. 

 

Can anyone help me out with this?

Hi,

 

I might be missing something, but let me try to answer directly. If you have further questions simply write.

 

So, to query the list, to get only users having specific status set, you need to use the "Query List" action and filter the results by your Status column:

 

Once you configure it, you need then to select "Separate output per column" option, select coulmn where names of users are, and save it to the collection variable:

 

Once you do it, next create a "For each" action, put that collection as the input and a text variable as the output:

 

And then inside that loop add action "Azure AD get user details" (for example - I assume your users' directory is now AAD), configure connection and select the property you want to retrieve.

 

Regards,

Tomasz


Reply