Share via

DeleteAuditDataRequest Class


Contains the data that is needed for customers using customer-managed encryption keys to delete all audit data records up until a specified end date.

public ref class DeleteAuditDataRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
public sealed class DeleteAuditDataRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type DeleteAuditDataRequest = class
    inherit OrganizationRequest
Public NotInheritable Class DeleteAuditDataRequest
Inherits OrganizationRequest


Even if you're using customer-managed encryption keys, you should consider using BulkDeleteRequest class rather than this request. Use BulkDelete to delete audit data.

For the Web API use the DeleteAuditData action.


Pass an instance of this class to the Execute(OrganizationRequest) method, which will return an instance of DeleteAuditDataResponse.

Privileges and Access Rights

The prvDeleteAuditPartitions privilege is required.

Notes for Callers

Audit data records are deleted sequentially from oldest to newest. This operation deletes all audit data in partitions where the end date is before the date specified in the EndDate property. Any empty partitions are also deleted. The current (active) partition and the audit records in it can't be deleted using this request or any other. Dataverse automatically creates partitions every quarter. You can't change or stop this behavior. You can use the RetrieveAuditPartitionListRequest class to obtain the list of partitions. If the end date of any partition is later than the current date, you can't delete that partition or any audit records in it.

Learn about deleting audit data.



Initializes a new instance of the DeleteAuditDataRequest class.



Gets or sets the end date and time. Required.


Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)

Gets or sets the ID of the request. Optional.

(Inherited from OrganizationRequest)

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)

Applies to