web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Skipping approvers in ...
Power Automate
Unanswered

Skipping approvers in a hierarchical approval process

(0) ShareShare
ReportReport
Posted on by 128

I have a somewhat complex approval process to implement. When a new Form is submitted I want it to go to the User's supervisor for approval, then to the User's Director for further approval. A Director may or may not be the User's Supervisor's supervisor.  We have multiple Directors.  Each user is subordinate to one Director.  All Directors report to the CEO, who is at the top of the staff hierarchy. 

 

How do I get the Director's name for a given user?  Both the User and the Director will be in the same Dept.  The number of intermediate steps between User and Director varies.

 

The process we want is...  User --> Approver (Supervisor) --> Approver (Director)

 

In effect there is an unknown number of line managers.   The user's reporting relationships might be any of the following, with the desired approvers shown in red...

User --> Line Manager X --> Director  --> CEO

User --> Line Manager A --> Line Manager B --> Director --> CEO

User --> Line Manager G --> Line Manager H --> Line Manager J --> Director --> CEO

User --> Line Manager P --> Line Manager Q --> Line Manager R --> Line Manager --> Director --> CEO

 

We also have the special case where the User is the Line Manager immediately subordinate to a Director i.e.

Line Manager W --> Director

 

Except for the special case we need 2 approvals...

  • Approver 1 - The user's immediate line manager - GetManager (V2) does this nicely
  • Approver 2 - The relevant Director

How do I find the relevant Director in every case?

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    For this kind of scenario your only real choice is to find or create some other data source where the hierarchy is maintained.  It doesn't seem like there is any specific way to determine the name of a particular user's director from the information stored in Office 365. 

     

    The only possibility I see would be  dependent on an assumption.  The assumption is that the relevant Director always reports directly to the CEO and no one else in the chain reports to the CEO.  If that is the case you can use a Do Until loop after the first manager to walk the chain of managers until you reach the CEO.  The last manager before you reach the CEO would be the director.

  • cymorg Profile Picture
    128 on at

    @Pstork1 - Thanks, I thought the same myself. The assumption that all Directors report the CEO is correct. I have a Do Until loop in my Flow at the right point but I don't know what to put in it.  I'm doing until what??  Until the current person's manager's email address is that of the CEO??  Conceptually I get it.  Practically I'm stumped as I don't know what to put in the Do Until loop.

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    I don't have access to a hierarchy like that so I can't show you a screenshot POC.  But here are the basic steps.

     

    1. Before entering the Loop create a variable to hold the Director's email address. Initialize it with the Manager's email who just approved.
    2. start a DoUntil loop
    3. Get the manager using the email in the variable. If the manager returned is the CEO then exit the loop and use the variable to send the approval.
    4. If not then store the manager returned in the variable and Loop.  repeat #3
  • v-litu-msft Profile Picture
    on at

    Hi @cymorg1,

    Has your problem been solved?
    If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Best Regards,
    Community Support Team _ Lin Tu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard