Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Easily authenticate with Dynamics CRM built-in services from a Node app.


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



15 Commits

Repository files navigation


(No longer maintained!)

Join the chat at

Version: 3.1.4

Easily authenticate with Dynamics CRM built-in services from a Node app.



import { ICrmService, CrmService, CrmResponse, CrmConnectionConfig, CrmO365ConnectionConfig, CrmAdConnectionConfig } from "node-dcrm-service";


const parameters =
      baseUrl: "",
      webApiHost: "",
	  tenant: "",
	  apiVersion: "8.2",
      username: "",
      password: "password",
      appId: "16cd08d5-b6f1-475e-90a3-d40d83e26bbc",
      clientId: "Ao+cz9J6MNe/tyizLZR5ili3Oth/vBoZzTr5DqS6r+o="
onlineConfig = new CrmO365ConnectionConfig(parameters);
onlineCrmService = new CrmService(onlineConfig);
await onlineCrmService.initialise();
const whoAmIResponse = await onlineCrmService.get("WhoAmI()");

Additional info

Steps to getting a Client ID

Wiki Page


The following blog post explains this library in a bit more detail: link.


v3.1.4 (2018-09-12)

  • Added: exposed the CrmService interface
  • Added: append /api/data/v8.2/ URL prefix by default
  • Added: parameterised the Web API service version
  • Improved: internally switched to async/await instead of explicit promises
  • Fixed: undefined error when request fails

v2.1.3 (2018-08-27)

  • Improved: switched to 'request' library to improve response handling
  • Improved: wrapped the response into a new class for type checking
  • Fixed: standardised response/error object

v1.1.8 (2018-08-26)

  • Added: 'data' parameter to post, put, and patch
  • Changed: exposed CrmConnectionConfig to be used for polymorphism

v1.1.6 (2018-08-26)

  • Added: example code
  • Added: Wiki entry for getting a Client ID
  • Removed: Node package dependency

v1.1.5 (2018-08-24)

  • Fixed: packaging issues

v1.1.2 (2018-08-23)

  • Initial release

Copyright © by Ahmed el-Sawalhy (Yagasoft) -- GPL v3 Licence