Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Calling dynamics api in React application

(0) ShareShare
ReportReport
Posted on by 5

Hello experts,

We have a requirement to create a react dashboard with Dynamics 365 data.

Can you please guide me how to call dynamics rest webapi in react app to create a report dashboard in dynamics 365.

Thanks in advance.

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Calling dynamics api in React application

    Hi Jaipal1,

    Method 1: Adal.js or Msal.js

    I tried to run a pure javascript html page to connect Dynamics 365 successfully by this doc tutorial:

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/walkthrough-registering-configuring-simplespa-application-adal-js

    In short, you need to register an Azure Active Directory application and use generated client ID and other necessary parameters in config object with adal.js.

    (These steps're introduced in detail in the link.)

    I havn't experience on react framework, but you could try react-adal in npm package center and integrate it into your project.

    The library GitHub page is here.

    Another option is msal.js, npm link here.

    See comparison between 2 js libraries:

    https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-compare-msal-js-and-adal-js

    Method 2: React-native-app-auth

    This article introduced another method: connect to Dynamics 365 with react-native-app-auth npm library in pure oAuth2,

    it didn't use adal.js or msal.js(those two are official js libraries from MS).

    https://medium.com/@nabinkn/dynamics-365-online-authentication-using-oauth2-and-react-native-19979c663b32

    You could also take it as reference.

    Hope above helps.

    Regards,

    Clofly

  • Jaipal1 Profile Picture
    Jaipal1 5 on at
    RE: Calling dynamics api in React application

    Thanks Mehdi, we are not using Power BI for reports and all reports for dashboard are need to built on react frameworks.

    Can you advise on this ? Thanks in advance.

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,212 User Group Leader on at
    RE: Calling dynamics api in React application

    Hi,

    Maybe you can create a Power BI dashboard report. Then you can add it to your web app. Please refer to this post:

    medium.com/.../how-to-embed-microsoft-powerbi-charts-into-your-react-application-a3078edf5dc6

    https://powerbi.microsoft.com/en-us/blog/power-bi-expands-access-to-intelligence-for-external-guest-users/

    Good Luck !

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans