Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Retrieve user roles from another environment

Posted on by 5,227

Hi ,

I will have to retrieve user details (user roles and Bu) from another instance using plugin code. Can someone knows how I can retrieve it ? Any help would be appreciated.

Note:

I have created one custom entity with user lookup and on select of user lookup I will have to populate user roles in single of text field  

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Retrieve user roles from another environment

    Hi,

    You Can achieve your requirement using Power Automate.

    Use Common Data service(Legacy) connector to connect to another instance, fetch required details then connect to source instance to populate the details.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Verified answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Retrieve user roles from another environment

    Hi Pravin,

    You can call Dynamics 365 WebAPI from the plugin and retrieve the roles filtered by the user. (using $select and $filter attributes). For calling the API, you should initially register the CRM application in Azure.

    Refer the link below for more details.

    https://debajmecrm.com/solved-call-web-api-from-within-a-plugin-in-dynamics-365-online/

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans