turbot/microsoft365
steampipe plugin install microsoft365

Table: microsoft365_calendar_event - Query Microsoft365 Calendar Events using SQL

Microsoft365 Calendar Events are a part of the Microsoft365 suite that enables users to schedule, manage, and track events. This includes meetings, appointments, and reminders. It provides features such as attendee management, notifications, and integration with other Microsoft365 services like Outlook and Teams.

Table Usage Guide

The microsoft365_calendar_event table provides insights into Calendar Events within Microsoft365. As an IT Administrator, you can explore event-specific details through this table, including schedules, attendees, and status. This can be utilized to manage and track events, monitor attendee participation, and analyze event patterns within your organization.

Important Notes

  • You must specify the user_id in the where or join clause (where user_id=, join microsoft365_calendar_event c on c.user_id=) to query this table.

Examples

Basic info

Explore the details of upcoming online meetings scheduled in the Microsoft365 calendar for a specific user. This can be useful to understand the user's schedule and meeting details, helping in effective time and resource management.

select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
order by
start_time
limit
10;
select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
order by
start_time
limit
10;

List upcoming events scheduled in next 4 days

Explore which upcoming events are scheduled in the next four days to manage your time and tasks effectively. This query is particularly useful for planning ahead and ensuring no important events are overlooked.

select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= current_date
and end_time <= (current_date + interval '4 days')
order by
start_time;
select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= date('now')
and end_time <= date('now', '+4 day')
order by
start_time;

List upcoming events scheduled in current month

Explore which upcoming events are scheduled in the current month to manage your time more efficiently. This query is useful in keeping track of your meetings in Microsoft 365 by providing a comprehensive overview of the event details.

select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= date_trunc('month', current_date)
and end_time <= date_trunc('month', current_date) + interval '1 month'
order by
start_time;
select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= date('now', 'start of month')
and end_time <= date('now', 'start of month', '+1 month')
order by
start_time;

List events scheduled in current week

Discover the segments that are scheduled for the current week in a particular user's Microsoft 365 calendar. This can be helpful for gaining insights into a user's weekly schedule, allowing for better time management and planning.

select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= date_trunc('week', current_date)
and end_time < (date_trunc('week', current_date) + interval '7 days')
order by
start_time;
select
subject,
online_meeting_url,
start_time,
end_time
from
microsoft365_calendar_event
where
user_id = 'test@org.onmicrosoft.com'
and start_time >= date('now', 'weekday 0', '-7 days')
and end_time < date('now', 'weekday 0', '+7 days')
order by
start_time;

Schema for microsoft365_calendar_event

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
allow_new_time_proposalsbooleanTrue if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Default is true.
attendeesjsonbThe collection of attendees for the event.
bodyjsonbThe body of the message associated with the event. It can be in HTML or text format.
body_previewtextThe preview of the message associated with the event in text format.
categoriesjsonbThe categories associated with the event.
change_keytextIdentifies the version of the event object. Every time the event is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object.
created_date_timetimestamp with time zoneThe Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
endjsonbThe date, time, and time zone that the event ends. By default, the end time is in UTC.
end_timetimestamp with time zone>, >=, =, <, <=The end date and time of the event. By default, the end time is in UTC.
has_attachmentsbooleanTrue if the event has attachments.
hide_attendeesbooleanIf set to true, each attendee only sees themselves in the meeting request and meeting Tracking list. Default is false.
ical_uidtextA unique identifier for an event across calendars. This ID is different for each occurrence in a recurring series.
idtext=Unique identifier for the event.
importancebigintThe importance of the event. The possible values are: low, normal, high.
is_all_daybooleanTrue if the event lasts all day. If true, regardless of whether it's a single-day or multi-day event, start and end time must be set to midnight and be in the same time zone.
is_cancelledbooleanTrue if the event has been canceled.
is_draftbooleanTrue if the user has updated the meeting in Outlook but has not sent the updates to attendees.
is_online_meetingbooleanTrue if this event has online meeting information (that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise. Default is false (onlineMeeting is null).
is_organizerbooleanTrue if the calendar owner (specified by the owner property of the calendar) is the organizer of the event (specified by the organizer property of the event).
is_reminder_onbooleanTrue if an alert is set to remind the user of the event.
last_modified_date_timetimestamp with time zoneThe Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
locationjsonbThe location of the event.
locationsjsonbThe locations where the event is held or attended from.
online_meetingjsonbDetails for an attendee to join the meeting online. Default is null.
online_meeting_providertextRepresents the online meeting service provider. By default, onlineMeetingProvider is unknown. The possible values are unknown, teamsForBusiness, skypeForBusiness, and skypeForConsumer.
online_meeting_urltextA URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype.
organizerjsonbThe organizer of the event.
original_end_time_zonetextThe end time zone that was set when the event was created.
original_start_time_zonetextThe start time zone that was set when the event was created.
recurrencejsonbThe recurrence pattern for the event.
reminder_minutes_before_startbigintThe number of minutes before the event start time that the reminder alert occurs.
response_requestedbooleanIf true, it represents the organizer would like an invitee to send a response to the event.
response_statusjsonbIndicates the type of response sent in response to an event message.
sensitivitytextThe sensitivity of the event. Possible values are: normal, personal, private, confidential.
series_master_idtextThe ID for the recurring series master item, if this event is part of a recurring series.
show_astextThe status to show. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
startjsonbThe start date, time, and time zone of the event. By default, the start time is in UTC.
start_timetimestamp with time zone>, >=, =, <, <=The start date and time of the event. By default, the start time is in UTC.
subjecttextThe text of the event's subject line.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The Azure Tenant ID where the resource is located.
titletextTitle of the resource.
transaction_idtextA custom identifier specified by a client app for the server to avoid redundant POST operations in case of client retries to create the same event.
user_idtext=ID or email of the user.
web_linktextThe URL to open the event in Outlook on the web.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- microsoft365

You can pass the configuration to the command with the --config argument:

steampipe_export_microsoft365 --config '<your_config>' microsoft365_calendar_event