Office 365 Management Activity API - Audit.SharePoint returns event out of the time frame











up vote
0
down vote

favorite












I'm working against the Office 365 Management Activity API and trying to get system events for a time frame. e.g. I want to get create folder events between 2018-11-21T16:58:43.4970000Z and 2018-11-21T16:58:46.5407833Z.
I'm sending this request first:
https://manage.office.com/api/v1.0/1111/activity/feed/subscriptions/content?contentType=Audit.Sharepoint&startTime=2018-11-21T16:58:43.4970000Z&endTime=2018-11-21T16:58:46.5407833Z&PublisherIdentifier=11111



and based on the response I send the second request:
https://manage.office.com/api/v1.0/11111/activity/feed/audit/20181121165257926082320$20181121165843497120740$audit_sharepoint$Audit_Sharepoint?PublisherIdentifier=11111



I get event list in the response. The problem is that I get events with creation time which is earlier then I defined in the requests (2018-11-21T16:55:09):




{"CreationTime":"2018-11-21T16:55:09","Id":"*****","Operation":"FolderCreated","OrganizationId":"********","RecordType":6,"UserKey":"i:0h.f|membership|******@live.com","UserType":0,"Version":1,"Workload":"OneDrive","ClientIP":"******","ObjectId":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/Documents/am1/amir444","UserId":"admin@501.blabla.com","CorrelationId":"******","EventSource":"SharePoint","ItemType":"Folder","ListId":"49fc3d8e-5345-4225-867f-451a753331eb","ListItemUniqueId":"b15f342b-5812-4ad9-9077-ce5c5454c4b1","Site":"014fe483-77db-4234-9245-fa144534d88fa","UserAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","WebId":"be54eb7-0f23-45bc-8540-389fbed45359","SourceFileExtension":"","SiteUrl":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/","SourceFileName":"amir444","SourceRelativeUrl":"Documents/am1"}




The strange thing is that every event (e.g. "FolderCreated") I'm getting twice. One in the correct time frame and the second when another event is created, even if the start time I'm defining is much bigger than the original event creation time...










share|improve this question
























  • What is the question?
    – Luke Walker
    Nov 22 at 12:16






  • 1




    Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
    – Amir M
    Nov 22 at 12:41















up vote
0
down vote

favorite












I'm working against the Office 365 Management Activity API and trying to get system events for a time frame. e.g. I want to get create folder events between 2018-11-21T16:58:43.4970000Z and 2018-11-21T16:58:46.5407833Z.
I'm sending this request first:
https://manage.office.com/api/v1.0/1111/activity/feed/subscriptions/content?contentType=Audit.Sharepoint&startTime=2018-11-21T16:58:43.4970000Z&endTime=2018-11-21T16:58:46.5407833Z&PublisherIdentifier=11111



and based on the response I send the second request:
https://manage.office.com/api/v1.0/11111/activity/feed/audit/20181121165257926082320$20181121165843497120740$audit_sharepoint$Audit_Sharepoint?PublisherIdentifier=11111



I get event list in the response. The problem is that I get events with creation time which is earlier then I defined in the requests (2018-11-21T16:55:09):




{"CreationTime":"2018-11-21T16:55:09","Id":"*****","Operation":"FolderCreated","OrganizationId":"********","RecordType":6,"UserKey":"i:0h.f|membership|******@live.com","UserType":0,"Version":1,"Workload":"OneDrive","ClientIP":"******","ObjectId":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/Documents/am1/amir444","UserId":"admin@501.blabla.com","CorrelationId":"******","EventSource":"SharePoint","ItemType":"Folder","ListId":"49fc3d8e-5345-4225-867f-451a753331eb","ListItemUniqueId":"b15f342b-5812-4ad9-9077-ce5c5454c4b1","Site":"014fe483-77db-4234-9245-fa144534d88fa","UserAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","WebId":"be54eb7-0f23-45bc-8540-389fbed45359","SourceFileExtension":"","SiteUrl":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/","SourceFileName":"amir444","SourceRelativeUrl":"Documents/am1"}




The strange thing is that every event (e.g. "FolderCreated") I'm getting twice. One in the correct time frame and the second when another event is created, even if the start time I'm defining is much bigger than the original event creation time...










share|improve this question
























  • What is the question?
    – Luke Walker
    Nov 22 at 12:16






  • 1




    Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
    – Amir M
    Nov 22 at 12:41













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm working against the Office 365 Management Activity API and trying to get system events for a time frame. e.g. I want to get create folder events between 2018-11-21T16:58:43.4970000Z and 2018-11-21T16:58:46.5407833Z.
I'm sending this request first:
https://manage.office.com/api/v1.0/1111/activity/feed/subscriptions/content?contentType=Audit.Sharepoint&startTime=2018-11-21T16:58:43.4970000Z&endTime=2018-11-21T16:58:46.5407833Z&PublisherIdentifier=11111



and based on the response I send the second request:
https://manage.office.com/api/v1.0/11111/activity/feed/audit/20181121165257926082320$20181121165843497120740$audit_sharepoint$Audit_Sharepoint?PublisherIdentifier=11111



I get event list in the response. The problem is that I get events with creation time which is earlier then I defined in the requests (2018-11-21T16:55:09):




{"CreationTime":"2018-11-21T16:55:09","Id":"*****","Operation":"FolderCreated","OrganizationId":"********","RecordType":6,"UserKey":"i:0h.f|membership|******@live.com","UserType":0,"Version":1,"Workload":"OneDrive","ClientIP":"******","ObjectId":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/Documents/am1/amir444","UserId":"admin@501.blabla.com","CorrelationId":"******","EventSource":"SharePoint","ItemType":"Folder","ListId":"49fc3d8e-5345-4225-867f-451a753331eb","ListItemUniqueId":"b15f342b-5812-4ad9-9077-ce5c5454c4b1","Site":"014fe483-77db-4234-9245-fa144534d88fa","UserAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","WebId":"be54eb7-0f23-45bc-8540-389fbed45359","SourceFileExtension":"","SiteUrl":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/","SourceFileName":"amir444","SourceRelativeUrl":"Documents/am1"}




The strange thing is that every event (e.g. "FolderCreated") I'm getting twice. One in the correct time frame and the second when another event is created, even if the start time I'm defining is much bigger than the original event creation time...










share|improve this question















I'm working against the Office 365 Management Activity API and trying to get system events for a time frame. e.g. I want to get create folder events between 2018-11-21T16:58:43.4970000Z and 2018-11-21T16:58:46.5407833Z.
I'm sending this request first:
https://manage.office.com/api/v1.0/1111/activity/feed/subscriptions/content?contentType=Audit.Sharepoint&startTime=2018-11-21T16:58:43.4970000Z&endTime=2018-11-21T16:58:46.5407833Z&PublisherIdentifier=11111



and based on the response I send the second request:
https://manage.office.com/api/v1.0/11111/activity/feed/audit/20181121165257926082320$20181121165843497120740$audit_sharepoint$Audit_Sharepoint?PublisherIdentifier=11111



I get event list in the response. The problem is that I get events with creation time which is earlier then I defined in the requests (2018-11-21T16:55:09):




{"CreationTime":"2018-11-21T16:55:09","Id":"*****","Operation":"FolderCreated","OrganizationId":"********","RecordType":6,"UserKey":"i:0h.f|membership|******@live.com","UserType":0,"Version":1,"Workload":"OneDrive","ClientIP":"******","ObjectId":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/Documents/am1/amir444","UserId":"admin@501.blabla.com","CorrelationId":"******","EventSource":"SharePoint","ItemType":"Folder","ListId":"49fc3d8e-5345-4225-867f-451a753331eb","ListItemUniqueId":"b15f342b-5812-4ad9-9077-ce5c5454c4b1","Site":"014fe483-77db-4234-9245-fa144534d88fa","UserAgent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","WebId":"be54eb7-0f23-45bc-8540-389fbed45359","SourceFileExtension":"","SiteUrl":"https://spenterprise501-my.sharepoint.com/personal/admin_501_blabla_com/","SourceFileName":"amir444","SourceRelativeUrl":"Documents/am1"}




The strange thing is that every event (e.g. "FolderCreated") I'm getting twice. One in the correct time frame and the second when another event is created, even if the start time I'm defining is much bigger than the original event creation time...







sharepoint onedrive office365api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 at 8:13

























asked Nov 22 at 11:53









Amir M

1431314




1431314












  • What is the question?
    – Luke Walker
    Nov 22 at 12:16






  • 1




    Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
    – Amir M
    Nov 22 at 12:41


















  • What is the question?
    – Luke Walker
    Nov 22 at 12:16






  • 1




    Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
    – Amir M
    Nov 22 at 12:41
















What is the question?
– Luke Walker
Nov 22 at 12:16




What is the question?
– Luke Walker
Nov 22 at 12:16




1




1




Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
– Amir M
Nov 22 at 12:41




Why do I get in the bucket event with creation time that is earlier than the bucket start time. And why do I get this event twice in two separate buckets - once in a "correct" bucket and the second in the wrong one.
– Amir M
Nov 22 at 12:41

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53430449%2foffice-365-management-activity-api-audit-sharepoint-returns-event-out-of-the-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53430449%2foffice-365-management-activity-api-audit-sharepoint-returns-event-out-of-the-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What visual should I use to simply compare current year value vs last year in Power BI desktop

Alexandru Averescu

Trompette piccolo