ADO.NET Provider for Microsoft Teams

Build 25.0.9434

TimesOff

Logs time-off entries requested by users through the Microsoft Teams Shifts interface, with reason codes and date ranges.

Table Specific Information

Select

Query the TimesOff table by retrieving everything from teams or by specifying TeamId. By default only the timesoff for teams of the groups you are a member of will be returned. To retreive timesoff for teams of all groups in your organization, set IncludeAllGroups property to true. The provider 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 provider.

  • TeamId supports the IN and = operators.
  • Id supports the = operator.

For example, the following queries are processed server side:

SELECT * FROM TimesOff WHERE TeamId IN ('da838338-4e77-4c05-82a6-79d9f0274511', 'da834568-4df7-4c05-82a6-79d9f0274515')
SELECT * FROM TimesOff WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'

Insert

To insert a timeoff into the team schedule, you need to specify TeamId, UserId to whom this timeoff is assigned, and at least one of the DraftTimeOff or SharedTimeOff information including: the startDateTime, the endDateTime of the timeoff and a timeOff_ReasonId.

INSERT INTO TimesOff (TeamId, UserId, sharedTimeOff_startDateTime, sharedTimeOff_endDateTime, SharedTimeOff_TimeOffReasonId) VALUES ('da838338-4e77-4c05-82a6-79d9f0274511', '0409f710-2aa9-4f05-8944-ef382160f1d1', '2019-03-11T07:00:00Z', '2019-03-12T07:00:00Z', 'TOR_97de5f58-462b-4bde-8a95-038b4073bffb')

Update

To update a timeoff record Id and TeamId are required in WHERE clause. You can update any other field other than TeamId, Id and CreatedDateTime.

UPDATE Timesoff SET draftTimeOff_timeOffReasonId = 'TOR_97de5f58-462b-4bde-8a95-038b4073bffb' WHERE Id = 'SHFT_dd50b99a-e2d8-44ad-a445-53ad58bfc37b' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'

Delete

To delete a timesoff record Id and TeamId are required in WHERE clause.

DELETE FROM TimesOff WHERE Id = 'SHFT_dd50b99a-e2d8-44ad-a445-53ad58bfc37b' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'

Columns

Name Type ReadOnly Description
Id [KEY] String False

A unique identifier for the time off entry.

UserId String False

The unique identifier of the user who submitted or was assigned this time off request.

TeamId String False

The identifier of the Microsoft Team associated with the time off request.

CreatedDateTime Datetime False

The date and time when the time off request was first created.

IsStagedForDeletion Bool False

Indicates whether the time off entry is marked for deletion but has not yet been removed.

LastModifiedBy_application_displayName String False

The name of the application that most recently modified the time off entry.

LastModifiedBy_application_id String False

The unique application ID of the system or service that last modified the entry.

LastModifiedDateTime Datetime False

The date and time when the time off entry was last updated.

DraftTimeOff_timeOffReasonId String False

The identifier for the reason associated with the draft version of the time off request.

SharedTimeOff_timeOffReasonId String False

The identifier for the reason associated with the shared (published) version of the time off request.

DraftTimeOff_StartDateTime Datetime False

The scheduled start date and time for the draft version of the time off.

DraftTimeOff_EndDateTime Datetime False

The scheduled end date and time for the draft version of the time off.

SharedTimeOff_StartDateTime Datetime False

The scheduled start date and time for the published version of the time off.

SharedTimeOfft_EndDateTime Datetime False

The scheduled end date and time for the published version of the time off.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434