Search code examples
dynamics-crmdynamics-crm-2016dynamics-crm-webapi

How to get the audit log of an entity in CRM 2016 using a web API


I have made a lot of research to get the log of changes for a specific entity using Microsoft dynamics CRM 2016 web API in , but that's useless I cannot find a way to did that.

I just found the RetrieveAuditPartitionLis which return collection of partitions, Response :

 "AuditPartitionDetailCollection": [
    {
      "PartitionNumber": 1,
      "StartDate": "2014-07-01T00:00:00Z",
      "EndDate": "2014-09-30T19:59:59.997-04:00",
      "Size": 9
    },
    {
      "PartitionNumber": 2,
      "StartDate": "2014-10-01T00:00:00Z",
      "EndDate": "2014-12-31T18:59:59.997-05:00",
      "Size": 8
    },

.....

I need a way to get the log of a specific entity for example /accounts/audit endpoint. How to achieve that?


Solution

  • By using the audits entity.

    End point : organization_domain/api/data/v8.0/audits