Notifications
Announcements
Hi all,
We have got a requirement where a 3rd party applications (most probably a node js application) wants to connect to our dataverse tables (read/write). Is there any way to call the dataverse webapi through this node js/javascript application?
I know about these articles:
1. Connecting Dataverse API through C# application: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/quick-start-console-app-csharp2. Connecting through single page application: https://github.com/MicrosoftDocs/powerapps-docs/blob/main/powerapps-docs/developer/data-platform/oauth-cross-origin-resource-sharing-connect-single-page-application.md
But in this case, the javascript application is not a single page application. What is the efficient way to expose the dataverse webapi with proper authentication. I already registered an azure app.
you don't need to expose the Dataverse Web API as they are already public protected by the authentication.
If you created an azure app registration you probably have a clientid/clientsecret and you can use them to obtain the bearer token.
With the bearer token you can execute your Web API (they are REST) with postman, nodejs or any other programming language.
To build the requests you can use my tool Dataverse REST Builder, regarding the bearer token I wrote some insights in this blog post.
Hi @GuidoPreite ,
Thank you for providing the inputs. I will definitely check out the rest builder tool. I am facing issue in getting bearer token. The client do not want to have a login popup, but should be able to get the dataverse data from their application. Any code snippets for the authorization part for such scenario in javascript?
as I wrote before if you have clientid/clientsecret you can get the bearer token, in this scenario there isn't a login popup (like the standard oauth flow)
You also need to keep in mind that you cannot retrieve a bearer token in the browser. Client credential flows are blocked from the browser because it would be a security risk when you would perform these actions in clear text.
You would need to have a backend service to call azure ad and create the token and pass it back to the browser.
Then you can use the token in your request header to the dynamics web api
@SShivi you may want to check out Scott Durow's https://github.com/scottdurow/dataverse-ify.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268