Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamics CRM Online + Node.js (request runns forever /hangs)

I tried to develop a node.js module that allows the use of the SOAP web service of CRM Online: XrmNodeKit

The code based on the JavaScript code provided by Jason Lattimer

So far I was able the retrieve the auth-token but when I execute the WhoAmI requst the web-service call just runs forever (see test "should fetch the name of the current user", no error is thrown....

You can find the source-code on github

Has anyone tried to consume the SOAP web-services via Node.js?

like image 846
thuld Avatar asked Nov 11 '22 08:11

thuld


1 Answers

Have you found this post?http://www.alexanderdevelopment.net/post/2015/01/24/authenticating-from-a-node-js-client-to-dynamics-crm-via-ad-fs-and-oauth2/ I understand this is the correct approach. You need to use OAuth.

But it is not correct in one regard (I'm quoting an expert from the CRM product team) He says "You cannot move the node.js code to client, since in this case you need to use the Implicit flow rather than the Authorization code flow , Finally after getting the OAuth token, you still cannot send it to our Web services from the client since [CRM Online] does not support CORS in 2013/2015"

While this is a .NET sample it covers the principles, just have to make it work with Node.js: https://bitbucket.org/Georged/caseowary/overview (credits to George Doubinski)

like image 65
Jim Daly -MSFT- Avatar answered Dec 06 '22 20:12

Jim Daly -MSFT-