Table: microsoft365_my_calendar - Query Microsoft 365 Calendars using SQL
Microsoft 365 Calendar is a time-management and scheduling calendar service developed by Microsoft. It allows users to view, schedule, and manage appointments and meetings. This service is integrated with Outlook and provides shared calendars, scheduling assistant, and calendar events among its features.
Table Usage Guide
The microsoft365_my_calendar
table provides insights into personal calendar events within Microsoft 365. As a project manager or team lead, you can explore event-specific details through this table, including event schedules, attendees, and associated metadata. Utilize it to gain a comprehensive view of your personal calendar events, such as meetings, appointments, and reminders.
Important Notes
- If not authenticating with the Azure CLI, this table requires the
user_id
argument to be configured in the connection config.
Examples
Basic info
Explore which calendars in your Microsoft 365 account have been set as default and can be edited. This is useful to understand your meeting scheduling preferences and the default online meeting provider.
select name, is_default_calendar, can_edit, default_online_meeting_providerfrom microsoft365_my_calendar;
select name, is_default_calendar, can_edit, default_online_meeting_providerfrom microsoft365_my_calendar;
List calendars the user can edit
Explore which calendars the user has editing permissions for, which can be useful for managing access rights and understanding the default online meeting providers associated with each calendar.
select name, can_edit, default_online_meeting_providerfrom microsoft365_my_calendarwhere can_edit;
select name, can_edit, default_online_meeting_providerfrom microsoft365_my_calendarwhere can_edit;
List permissions for each calendar
Discover the segments that have different permissions within each calendar. This can be useful in understanding the access levels of various roles and individuals in your organization, helping to maintain security and control.
select c.name, p -> 'allowedRoles' as permission_allowed_roles, p -> 'emailAddress' as permission_email_address, p ->> 'id' as permission_id, p -> 'isInsideOrganization' as permission_inside_organization, p -> 'isRemovable' as permission_is_removable, p ->> 'role' as permission_rolefrom microsoft365_my_calendar as c, jsonb_array_elements(permissions) as p;
select c.name, json_extract(p.value, '$.allowedRoles') as permission_allowed_roles, json_extract(p.value, '$.emailAddress') as permission_email_address, json_extract(p.value, '$.id') as permission_id, json_extract(p.value, '$.isInsideOrganization') as permission_inside_organization, json_extract(p.value, '$.isRemovable') as permission_is_removable, json_extract(p.value, '$.role') as permission_rolefrom microsoft365_my_calendar as c, json_each(c.permissions) as p;
Control examples
- CIS v1.4.0 > 2 Application Permissions > 2.2 Ensure calendar details sharing with external users is disabled
- CIS v1.5.0 > 2 Application Permissions > 2.2 Ensure calendar details sharing with external users is disabled
- CIS v2.0.0 > 2 Application Permissions > 2.3 Ensure 'External sharing' of calendars is not available
- CIS v3.0.0 > 1 Microsoft 365 admin center > 1.3 Settings > 1.3.3 Ensure 'External sharing' of calendars is not available
Schema for microsoft365_my_calendar
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
allowed_online_meeting_providers | jsonb | Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. | |
calendar_group_id | text | = | The ID of the group. |
can_edit | boolean | True if the user can write to the calendar, false otherwise. | |
can_share | boolean | True if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it. | |
can_view_private_items | boolean | True if the user can read calendar items that have been marked private, false otherwise. | |
change_key | text | Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. | |
color | text | Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor. | |
default_online_meeting_provider | text | The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. | |
hex_color | text | The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. | |
id | text | = | The calendar's unique identifier. |
is_default_calendar | boolean | True if this is the default calendar where new events are created by default, false otherwise. | |
is_removable | boolean | Indicates whether this user calendar can be deleted from the user mailbox. | |
is_tallying_responses | boolean | Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. | |
multi_value_extended_properties | jsonb | The collection of multi-value extended properties defined for the calendar. | |
name | text | The calendar name. | |
owner | jsonb | Represents the user who created or added the calendar. | |
permissions | jsonb | Represents the user who created or added the calendar. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Tenant ID where the resource is located. |
title | text | Title of the resource. | |
user_id | text | ID or email of the user. |
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_my_calendar