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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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
    69,383 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
    69,383 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard