Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How to Get Manager Details from Azure AD and update in Dynamics CRM using MS Flow?

Posted on by 10

Hi All,

I need to retrieve all the Users in Dynamics without a Manager (OOB field - A lookup to User), get the Manager details of those Users from Azure AD and update the Manager details in Dynamics CRM using Microsoft Flows.

2 scenarios :

a) When the User contains Manager in AAD - Flow runs successfully

b) When the User doesn't contain Manager in AAD - Flow fails and terminates the execution.

I have tried Error handling by having the steps configured after success and failure of Get Manager, but the Flow terminates.

0246.Update-Manager-in-D365.PNG

Count of Users Without a Manager is configured to run on failure of Get Manager and Update Manager Details is configured to run on success of Get Manager.

(The count of records without a Manager in AAD is huge and hence updating Manager for the Users in AAD is not preferable.)

Let me know if there is a fix to the above.

 

Thanks & Regards,

Shravya P

  • Suggested answer
    StefanS365 Profile Picture
    StefanS365 3,573 Most Valuable Professional on at
    RE: How to Get Manager Details from Azure AD and update in Dynamics CRM using MS Flow?

    Hi Shravya,

    I wrote a blog post about a solution for this with Flow:

    User attribute values lost in synchronization > Flow to the rescue: Manager

    The error is "by design": Known Issues and Limitations

    So the Flow will fail when missing Manager for user, but will continue to run until all active users are checked.
    This works for me ;-)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans