Schedules
Defines the overarching containers used in Teams Shifts for organizing shifts, time-off requests, and schedule groups.
Table Specific Information
Select
Query the Schedules table by retrieving everything from teams or by specifying TeamId with = and IN operators. By default only the schedule items for teams of the groups you are a member of will be returned. To retreive schedules for teams of all groups in your organization, set IncludeAllGroups property to true. The add-in will use the Microsoft Teams API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the add-in.
- TeamId supports the '=' and IN operators.
For example, the following query is processed server side:
SELECT * FROM Schedules WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'
Update
To update a schedule record Id and TeamId are required in WHERE clause.
UPDATE Schedules SET timeZone = 'Africa/Casablanca', enabled = true WHERE Id = '4729c5e5-f923-4435-8a41-44423d42ea79' AND TeamId = '4729c5e5-f923-4435-8a41-44423d42ea79'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | False |
A unique identifier representing the schedule instance within Microsoft Teams. |
| TeamId [KEY] | String | False |
The identifier of the Microsoft Team that this schedule is associated with. |
| Enabled | Bool | False |
Specifies whether the schedule is currently active and usable by the associated team. |
| OfferShiftRequestsEnabled | Bool | False |
Indicates whether team members are allowed to offer their scheduled shifts to others. |
| OpenShiftsEnabled | Bool | False |
Indicates whether open shifts are supported, allowing managers to post available shifts for pickup. |
| ProvisionStatus | String | False |
Shows the current state of schedule provisioning. Valid values include notStarted, running, completed, and failed. |
| ProvisionStatusCode | String | False |
Provides additional details explaining why the schedule provisioning could have failed. |
| SwapShiftsRequestsEnabled | Bool | False |
Indicates whether team members are permitted to request a shift swap with another member. |
| TimeClockEnabled | Bool | False |
Specifies whether the time clock feature is enabled, allowing users to clock in and out through Teams. |
| TimeOffRequestsEnabled | Bool | False |
Indicates whether team members are allowed to submit time off requests through the schedule. |
| TimeZone | String | False |
Defines the time zone for the schedule, using IANA tz database format (for example, America/New_York). |
| WorkforceIntegrationIds | String | False |
A comma-separated list of integration identifiers linked to external workforce systems that sync with this schedule. |