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 / Creating sharepoint el...
Power Automate
Answered

Creating sharepoint element, if Office 365 User has a manager

(0) ShareShare
ReportReport
Posted on by 17

Hello,

 

I want to create a sharepoint list element, if a user has a manager in Office 365. The problem I have, the element "Get manager" throws an error, if he has not a manager.

 

The good thing is, that my flow are creating the elements for the users, who has a manager.

The bad thing is, that the flow said he had an mistake, but I only want to ignore these errors.

 

In other programming languages, I would use "HasManager" and would then use "GetManager". But I dont know, how to do this in Power Automate.

 

Mandree_0-1635431569760.png

Thanks for your help.

 

Best regards

Marcel

Categories:
I have the same question (0)
  • eliotcole Profile Picture
    4,390 Moderator on at

    Have a play with the Groups Graph actions, I'm currently trying to find out how to display manager details via a Graph HTTP call, but it's not easy!

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Mandree :

    If the target user does not use a manager, then Get manger will fail. So you only need to add a branch under Get manger, execute branch A successfully, and execute branch B if execution fails, so that even if flow reports an error when running, it can ensure that the function is normal.

    1\Add a parallel branch

    vbofengmsft_0-1635493916974.png

    2\

    vbofengmsft_1-1635494032238.png

    vbofengmsft_3-1635494069756.png

    The Result:

    You can find that the fourth loop execution failed, Flow did not end immediately, and the fifth loop executed successfully.

    vbofengmsft_5-1635494305383.png

     

    vbofengmsft_6-1635494344739.png

    Best Regards,

    Bof

     

     

  • Mandree Profile Picture
    17 on at

    Thanks for your reply. But I wrote, that my flow does the same.

    "The good thing is, that my flow are creating the elements for the users, who has a manager."

     

    But what I dont want, that in the flowhistory the status jumps on error.

    Mandree_0-1635502402024.png

     

    So how could I edit my flow, that I dont get an error in flow history.

     

  • eliotcole Profile Picture
    4,390 Moderator on at

    The Groups connector has a Graph HTTP request action that you should be able to interact with graph to check manager status a little better ... I've just been struggling to find the right way in for you on that.

     

    Seriously, I hyper-focused on this for HOURS yesterday by mistake ... but it was educational for me!

     

    The manager information is an additional set of information on a user that isn't always sent with the core data about a user, and I have just been struggling to get it to show for the (admittedly 'guest') users that have me as a manager for testing purposes in my personal tenancy.

     

  • eliotcole Profile Picture
    4,390 Moderator on at

    Also, sorry for second post, @Mandree , but it's a different point. Have you tried using different connectors, like Groups, anyway?

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Mandree :

    You could add a "Terminate" after the 'apply to each' action

    vbofengmsft_3-1635732157224.png

    vbofengmsft_1-1635732118459.pngvbofengmsft_2-1635732130459.png

    Best Regards,

    Bof

     

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
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard