{"id":27200714,"url":"https://github.com/derekfinlinson/xrm-webapi","last_synced_at":"2025-07-12T03:12:03.302Z","repository":{"id":11095093,"uuid":"67158201","full_name":"derekfinlinson/xrm-webapi","owner":"derekfinlinson","description":"Dynamics 365 Web Api TypeScript module","archived":false,"fork":false,"pushed_at":"2023-01-06T10:19:05.000Z","size":1266,"stargazers_count":27,"open_issues_count":11,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-15T18:13:44.847Z","etag":null,"topics":["365","crm","dynamics","dynamics-365","typescript","webapi","xrm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derekfinlinson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.json","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-01T18:57:59.000Z","updated_at":"2024-01-09T09:15:24.000Z","dependencies_parsed_at":"2023-01-13T16:19:44.089Z","dependency_job_id":null,"html_url":"https://github.com/derekfinlinson/xrm-webapi","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekfinlinson%2Fxrm-webapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekfinlinson%2Fxrm-webapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekfinlinson%2Fxrm-webapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekfinlinson%2Fxrm-webapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derekfinlinson","download_url":"https://codeload.github.com/derekfinlinson/xrm-webapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114408,"owners_count":21050031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["365","crm","dynamics","dynamics-365","typescript","webapi","xrm"],"created_at":"2025-04-09T21:30:00.826Z","updated_at":"2025-04-09T21:30:01.621Z","avatar_url":"https://github.com/derekfinlinson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED Use [dataverse-webapi](https://www.npmjs.com/package/dataverse-webapi) Instead \n\n# xrm-webapi\n|Build|NPM|\n|-----|---|\n|[![Build Status](https://derekfinlinson.visualstudio.com/GitHub/_apis/build/status/derekfinlinson.xrm-webapi)](https://derekfinlinson.visualstudio.com/GitHub/_build/latest?definitionId=2)|[![npm](https://img.shields.io/npm/v/xrm-webapi.svg?style=flat-square)](https://www.npmjs.com/package/xrm-webapi)|\n\nA Dynamics 365 Web Api TypeScript module for use in web resources or external web apps in the browser or node.\n\nAll requests return Promises. To support Internet Explorer, be sure to include a promise polyfill when deploying to CRM.\n\n*Requires Dynamics CRM 2016 Online/On-Prem or later*\n\n### Installation\n\n##### Node\n\n```\nnpm install xrm-webapi\n```\n### Usage\n\n#### Browser\n```typescript\nimport { parseGuid, retrieve, WebApiConfig } from \"xrm-webapi\";\n\nconst config = new WebApiConfig(\"8.2\");\n\nconst account = await retrieve(config, \"accounts\", parseGuid(\"00000000-0000-0000-0000-000000000000\"), \"$select=name\");\n\nconsole.log(account.name);\n```\n\n#### Node\n```typescript\nimport { parseGuid, retrieve, WebApiConfig } from \"xrm-webapi/dist/xrm-webapi-node\";\n\nconst config = new WebApiConfig(\"8.2\", tokenFromAdal, 'https://org.crm.dynamics.com');\n\nconst account = await retrieve(config, \"accounts\", parseGuid(\"00000000-0000-0000-0000-000000000000\"), \"$select=name\");\n\nconsole.log(account.name);\n```\n\n#### Angular\n\nFor use in Angular applications, I'd first recommend using their built in [HttpClient](https://angular.io/guide/http). Besides batch operations, most D365 Web Api requests are\npretty simple to construct. If you do want to use this library, the usage is the same as the browser usage:\n\n```typescript\nimport { parseGuid, retrieveNode, WebApiConfig } from \"xrm-webapi\";\n\nconst config = new WebApiConfig(\"8.2\", tokenFromAdal, 'https://org.crm.dynamics.com');\n\nconst account = await retrieve(config, \"accounts\", parseGuid(\"00000000-0000-0000-0000-000000000000\"), \"$select=name\");\n\nconsole.log(account.name);\n```\n\n#### Supported methods\n* Retrieve\n* Retrieve multiple (multiple pages)\n* Retrieve multiple with Fetch XML\n* Create\n* Create with returned data\n* Update\n* Update with returned data\n* Update single property\n* Delete\n* Delete single property\n* Associate\n* Disassociate\n* Web API Functions\n* Web API Actions\n* Batch operations\n* Impersonation using Azure Object Id\n\n#### Samples\nSee [xrm-webapi-samples.ts](samples/xrm-webapi-samples.ts) for examples\n\n### Useful Links\n\n[Web API Reference](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/perform-operations-web-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekfinlinson%2Fxrm-webapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderekfinlinson%2Fxrm-webapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekfinlinson%2Fxrm-webapi/lists"}