Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MicrosoftManagementActivity] updated fetch start_time #28713

Merged
merged 9 commits into from Aug 3, 2023

Conversation

michal-dagan
Copy link
Contributor

@michal-dagan michal-dagan commented Aug 2, 2023

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

Fixed an issue where the start time for fetching incidents from the last retrieval was not parsed correctly.

From Microsoft docs: https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference#list-available-content: Both must be specified (or both omitted) and they must be no more than 24 hours apart, with the start time no more than 7 days in the past. By default, if startTime and endTime are omitted, then the content available in the last 24 hours is returned.

@michal-dagan michal-dagan marked this pull request as ready for review August 3, 2023 07:43
@michal-dagan michal-dagan changed the title Xsup 24583 microsoft management activity api [MicrosoftManagementActivity] updated fetch start_time Aug 3, 2023
Copy link
Contributor

@bziser bziser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

fetch_end_datetime = get_fetch_end_time_based_on_start_time(fetch_start_datetime)

# The API expects strings of format YYYY:DD:MMTHH:MM:SS
fetch_start_time_str = fetch_start_datetime.strftime(DATE_FORMAT)
fetch_end_time_str = fetch_end_datetime.strftime(DATE_FORMAT)
demisto.debug(f"get_fetch_start_and_end_time: {fetch_start_time_str=}, {fetch_end_time_str=}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great that you added logging!

@ShirleyDenkberg
Copy link
Contributor

@bziser Doc review completed. Looks good.

…mentActivity/README.md

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>
@michal-dagan michal-dagan merged commit c245361 into master Aug 3, 2023
14 checks passed
@michal-dagan michal-dagan deleted the xsup-24583-microsoft-management-activity-api branch August 3, 2023 10:28
ostolero pushed a commit that referenced this pull request Aug 8, 2023
* improved

* improved

* updated docker

* added log

* added docs

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

---------

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>
xsoar-bot pushed a commit to xsoar-contrib/content that referenced this pull request Oct 5, 2023
* improved

* improved

* updated docker

* added log

* added docs

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

---------

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>
tkatzir pushed a commit that referenced this pull request Dec 20, 2023
* improved

* improved

* updated docker

* added log

* added docs

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>

* Update Packs/MicrosoftManagementActivity/Integrations/MicrosoftManagementActivity/README.md

---------

Co-authored-by: Binat Ziser <89336697+bziser@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants