Audit operations - Gets Audit Records

Gets the audit records between a given date range If the number of records is more than a page full, a continuation token will be returned and the continuation token can be used to get the next set of audit records. This service only supports AuditRecord retrieval for the last 90 days and a maximum window of 30 days.

GET https://api.partnercenter.microsoft.com/auditactivity/v{version}/auditrecords?auditRequest.startDate={auditRequest.startDate}
GET https://api.partnercenter.microsoft.com/auditactivity/v{version}/auditrecords?auditRequest.filter.field={auditRequest.filter.field}&auditRequest.filter.value={auditRequest.filter.value}&auditRequest.filter.operator={auditRequest.filter.operator}&auditRequest.startDate={auditRequest.startDate}&auditRequest.endDate={auditRequest.endDate}&auditRequest.size={auditRequest.size}

URI Parameters

Name In Required Type Description
version
path True

string

auditRequest.startDate
query True

string

date-time
auditRequest.endDate
query

string

date-time
auditRequest.filter.field
query

string

auditRequest.filter.operator
query

integer

int32
auditRequest.filter.value
query

string

auditRequest.size
query

integer

int32

Request Header

Name Required Type Description
Authorization True

string

Bearer authentication token

ms-correlationid

string

Correlation Id

ms-requestid

string

Request Id

Responses

Name Type Description
200 OK

PagedResourceCollection[AuditRecord]

The request was successful. The response body contains a list of the audit records that match the filter. A continuation token is included if the response is paged by the page size. This token can be passed to /auditRecords?seek= to seek audit results.

Media Types: "application/json", "text/json"

400 Bad Request

There was a missing or an invalid input. The response body will provide the error details.

Media Types: "application/json", "text/json"

401 Unauthorized

The request was not authenticated. The client needs to authenticate with the partner API service first.

Media Types: "application/json", "text/json"

403 Forbidden

The request was authenticated but was refused since the caller does not have the rights to invoke it.

Media Types: "application/json", "text/json"

404 Not Found

The resource is not found or not available with the given input parameters.

Media Types: "application/json", "text/json"

500 Internal Server Error

The partner API service or one of its dependencies failed to fulfill the request. Callers may retry this.

Media Types: "application/json", "text/json"

Security

Authorization

Bearer authentication token

Type: apiKey
In: header

Definitions

Name Description
AuditRecord
KeyValuePair[String,String]
Link
PagedResourceCollection[AuditRecord]
ResourceAttributes
ResourceLinks

AuditRecord

Name Type Description
applicationId

string

attributes

ResourceAttributes

customerId

string

customerName

string

customizedData

KeyValuePair[String,String][]

id

string

operationDate

string

operationStatus enum:
  • decline
  • failed
  • progress
  • succeeded
operationType enum:
  • add_application_credential
  • add_customer
  • add_user_member
  • cancel_credit
  • convert_trial_subscription
  • create_agreement
  • create_credit
  • create_customer_user
  • create_mpn_association
  • create_order
  • create_partner_relationship
  • create_partner_user
  • create_referral
  • create_related_referral
  • create_self_serve_policy
  • create_self_serve_policy
  • create_transfer
  • dap_admin_relationship_approved
  • dap_admin_relationship_approved
  • dap_admin_relationship_terminated
  • dap_admin_relationship_terminated
  • delete_customer
  • delete_customer_user
  • delete_self_serve_policy
  • delete_tip_customer
  • device_deleted
  • device_updated
  • devices_update_attempted
  • devices_upload_to_existing_batch_attempted
  • devices_upload_to_new_batch_attempted
  • extend_relationship
  • get_software_download_link
  • get_software_key
  • granular_admin_access_assignment_activated
  • granular_admin_access_assignment_created
  • granular_admin_access_assignment_deleted
  • granular_admin_access_assignment_updated
  • granular_admin_relationship_activated
  • granular_admin_relationship_approved
  • granular_admin_relationship_cleaned_up
  • granular_admin_relationship_expired
  • granular_admin_relationship_terminated
  • granular_admin_relationship_termination_requested
  • increase_spending_limit
  • policy_created
  • policy_deleted
  • policy_updated
  • ready_invoice
  • register_application
  • remove_application_credential
  • remove_partner_customer_relationship
  • remove_partner_relationship
  • remove_partner_user
  • remove_user_member
  • reset_customer_user_password
  • restore_customer_user
  • software_attestation
  • unregister_application
  • update_company_info
  • update_credit
  • update_customer_billing_profile
  • update_customer_partner_contract_company_name
  • update_customer_qualification
  • update_customer_spending_budget
  • update_customer_user
  • update_customer_user_licenses
  • update_customer_user_principal_name
  • update_mpn_association
  • update_order
  • update_partner_user
  • update_referral
  • update_related_referral
  • update_self_serve_policy
  • update_sfb_customer_user_licenses
  • update_subscription
  • update_transfer
  • upgrade_subscription
originalCorrelationId

string

partnerId

string

resourceNewValue

string

resourceOldValue

string

resourceType enum:
  • agreement
  • application
  • application_credential
  • credit
  • customer
  • customer_directory_role
  • customer_user
  • device
  • granular_admin_access_assignment
  • granular_admin_relationship
  • invoice
  • license
  • mpn_association
  • order
  • partner_customer_dap
  • partner_customer_relationship
  • partner_relationship
  • partner_user
  • policy
  • referral
  • self_serve_policy
  • software_download_link
  • software_key
  • software_page
  • spending_limit
  • subscription
  • third_party_add_on
  • transfer
sessionId

string

userPrincipalName

string

KeyValuePair[String,String]

Name Type Description
key

string

value

string

Name Type Description
body

string

headers

KeyValuePair[String,String][]

method

string

uri

string

PagedResourceCollection[AuditRecord]

Name Type Description
attributes

ResourceAttributes

continuationToken

string

items

AuditRecord[]

links

ResourceLinks

totalCount

integer

ResourceAttributes

Name Type Description
etag

string

objectType

string

Name Type Description
next

Link

previous

Link

self

Link