Data Model
The CData Python Connector for Microsoft Teams models Microsoft Teams objects as an easy-to-use SQL database, using tables, views, and stored procedures. These are defined in schema files, which are simple, easy-to-read text files that define the structure and organization of data.
A Microsoft Teams object has relationships to other objects; in the tables, these relationships are expressed through foreign keys.
Tables
The Tables section, which details standard SQL tables, and the Views section, which lists read-only SQL tables, contain samples of what you might have access to in your Microsoft Teams account.
Common tables include:
| Table | Description |
| Teams | Maintains records of Microsoft Teams instances, including team names, visibility settings, and associated group metadata. |
| Channels | Tracks Microsoft Teams channel instances, capturing names, privacy settings, types (standard, private), and team associations. |
| Users | Contains detailed profile, organizational, and directory synchronization information for users in Microsoft Teams, including contact details, licensing, job roles, and Active Directory mappings. |
| Groups | Holds core metadata about Microsoft 365 Groups, including properties required for provisioning and maintaining Teams. |
| GroupMembers | Represents the relationship between Microsoft 365 Groups and their members, including user identifiers and membership roles. |
| GroupOwners | Identifies users assigned as owners of Microsoft 365 Groups that support Teams functionality, enabling management actions. |
| TeamMembers | Retrieves the list of users who are members of a specific Microsoft Teams team. |
| ChannelMembers | Retrieves a list of members belonging to a specific Microsoft Teams channel. |
| Chats | Provides a list of chat threads within Microsoft Teams, including group and one-on-one chats. |
| ChatMessages | Returns messages sent and received in Microsoft Teams chat threads. |
| ChannelMessages | Returns messages and replies exchanged within a Microsoft Teams channel. |
| ChatMembers | Retrieves details of participants in Microsoft Teams chat conversations. |
| TeamsInstalledApps | Maintains records of Microsoft Teams instances, including team names, visibility settings, and associated group metadata. |
| Apps | Contains metadata for third-party and internal apps integrated into Microsoft Teams, including installation details, permissions, and usage metrics. |
| TeamTabs | Documents tabs added to Teams channels, including tab type (Planner, Website, custom app) and configuration data. |
| Schedules | Defines the overarching containers used in Teams Shifts for organizing shifts, time-off requests, and schedule groups. |
| Shifts | Captures detailed shift assignments, including assigned user, start and end times, and optional shift notes. |
| OpenShifts | Stores reusable shift templates created by managers in the Teams Shifts app, used to build individual shift schedules. |
| TimesOff | Logs time-off entries requested by users through the Microsoft Teams Shifts interface, with reason codes and date ranges. |
| TimeOffReasons | Contains predefined labels for time-off requests in Teams Shifts, such as vacation, sick leave, or training. |
Stored Procedures
Stored Procedures are SQL scripts that extend beyond standard CRUD operations. They accept parameters, execute functions, manage OAuth authentication tokens, and return data from the service, indicating success or failure.