GroupOwners
GroupOwners table for MSTeams data provider.
Table Specific Information
Select
Query the GroupOwners table by retrieving everything from teams or by specifying GroupId with = and IN operators. By default only the owners of the groups you are a member of will be returned. To retreive owners for 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.
- GroupId supports the '=' and IN operator.
For example, the following queries are processed server side:
SELECT * FROM GroupOwners WHERE GroupId IN ('4729c5e5-f923-4435-8a41-44423d42ea79', 'acabe397-8370-4c31-aeb7-2d7ae6b8cda1') SELECT * FROM GroupOwners WHERE GroupId = '4729c5e5-f923-4435-8a41-44423d42ea79'
Insert
You can add a user to the group's owners. The owners are a set of non-admin users who are allowed to modify the group object. GroupId and OwnerId fields are required to insert a new member to a group. OwnerId correspond to the Id of the User, you can query the Users table to get the Id of the User you want to add as an onwer.
INSERT INTO GroupOwners (GroupId, OwnerId) VALUES ('acabe397-8370-4c31-aeb7-2d7ae6b8cda1', 'ad9de185-a7af-4ae5-946e-17fc1bf596f0')
Delete
You can delete a group member by specifying GroupId and OwnerId.
DELETE FROM GroupOwners WHERE GroupId = 'e557c6d9-3d9a-4658-b51a-4f242c2f8ec8' AND OwnerId = 'ba074a2a-69be-45d2-8519-2cc5688bca1e'
Columns
Name | Type | ReadOnly | Description |
GroupId [KEY] | String | False |
The Id of the Group. |
OwnerId [KEY] | String | False |
The User Id of the owner listed. |