User Profile for manager

I have a people picker that allows the user to select multiple individuals.
What I would like to know if there is a way to get the Department Manager for the first person entered.
There will be an approval process that will require Department Manager approval. I know that technically you could have multiple managers but we just need one manager to approve the request, And 99.9 % of the time the request is for either one person or a group in the same department all with the same manager.
Thanks
Jennifer

Dear Jennifer,
So what exactly is needed here? Do you want to re-arrange users as soon as Department Manager is added, so it is the first one in the field? Or do you want to block input of other users into the field, until at least one manager is added?

Also, what makes a Department Manager? Is it a Site Collection group? A Site group? Some property in the user’s profile?

We need more information in order to propose any course of action, it is quite vague at the moment.

Currently in Info path we have a rule that allows us to get the first person entered and using the User Profile service obtain that persons Manager. We place it on the form in a hidden field so that we can use it later in a workflow. I would like to do the same thing with Plumsail. This process is hidden from the users. They don’t even know it occurs. maybe something could be done on submit that would pull that information. I can not use MS Flow because it wants to loop through all the individuals and give me a list of managers. I want only one manager.