Introduction

Enzo Server
  Installation
  Quick Start
  Core Features
    Async Calls
    ConnectionStrings
    Edge Cache
    HTTP Access
    Scheduling
    Views
  Advanced Capabilities
    Change Data Capture
  Administration
    Configuration Settings
    Logins & ACL
    Auditing
    Current Executions
    Linked Server
    SSL

  User Guides
     Sharding
     Sharding Overview

     SharePoint

   Adapters
    All Adapters


  SDK
    Overview
    Installation
    DevHost
    Create A Simple Adapter
    Handler Columns

    Advanced SDK Concepts
      Handler Decorators
      Dynamic Columns
      Table & Table Enumerators
      Virtual Tables



Teams Adapter








This adapter allows you to access Microsoft Teams channels and messages from SQL Server directly, and through REST commands.


This adapter requires configuring Azure AD and OAuth




This adapter is in preview; the SendMessage operation is not yet functional.

Contact Enzo support for configuration instuctions.


Configuration Settings



Name Description Default
Boolean _isDefault Make this the default configuration. Defaults to true if configName is already the default.
String tenantId tenantId used for authentication
String appId appId used for authentication
String clientSecret client secret used for authentication
Boolean isBeta specify a 1 to use the Graph beta endpoints for protected endpoints True

Handlers



AddGroupOwner
owner
Add an owner to a Team Group details 

Arguments

Name Description Default
groupId R
userId R

SQL Call

exec Teams.AddGroupOwner 'groupId','userId'
insert into Teams.owner(groupId,userId) values('groupId','userId')


Http Call

/bsc/teams/addgroupowner

Output Columns

This call does not return data.

AddMember
member
Add member in a Team Group details 

Arguments

Name Description Default
groupId R
userId R

SQL Call

exec Teams.AddMember 'test', 'userId'
insert into Teams.member (groupId,userId) values ('groupId','userId')


Http Call

/bsc/teams/addmember

Output Columns

This call does not return data.

ArchiveTeam
team
Archive a Team details 

Arguments

Name Description Default
teamId R

SQL Call

exec Teams.ArchiveTeam 'teamId'
delete from Teams.team where teamId='teamId'


Http Call

/bsc/teams/archiveteam

Output Columns

This call does not return data.

CloneTeam
Clone an existing Team details 

Arguments

Name Description Default
teamId R
displayname R
mailnickname R
description

SQL Call

exec Teams.CloneTeam 'teamId', 'testTeam', 'testTeam'


Http Call

/bsc/teams/cloneteam

Output Columns

This call does not return data.

CreateChannel
channel
Create a Team Channel details 

Arguments

Name Description Default
teamId
displayname
description

SQL Call

exec Teams.CreateChannel 'teamId','test','test from enzo'
insert into Teams.channel(teamId,displayname,description) values('teamId','test name','test from enzo')


Http Call

/bsc/teams/createchannel

Output Columns

String channelId
String displayname
String description
CreateGroup
group
Create a Team Group details 

Arguments

Name Description Default
displayname R
description
mailNickname
owners
members
visibility Public

SQL Call

exec Teams.CreateGroup 'displayname','description','mailNickName','owner1,owner2','member1,member2','public'
insert into Teams.group (displayname,description,mailNickname,owners,members,visibility) values ('displayname','description','mailnickname','ownerid1,ownerid2','memberid1,memberid2','Public')


Http Call

/bsc/teams/creategroup

Output Columns

This call does not return data.

CreateTeam
team
Create a new Team details 

Arguments

Name Description Default
groupId R

SQL Call

exec Teams.CreateTeam 'groupid'
insert into Teams.team (groupId) values ('groupId')


Http Call

/bsc/teams/createteam

Output Columns

This call does not return data.

DeleteChannel
channel
Delete a Channel in a Team details 

Arguments

Name Description Default
teamId R
channelId R

SQL Call

exec Teams.DeleteChannel @teamId='teamId',@channelId='channelId'
delete from Teams.channel where teamId='teamId' and channelId='channelId'


Http Call

/bsc/teams/deletechannel

Output Columns

This call does not return data.

DeleteGroup
group
Delete a Team Group details 

Arguments

Name Description Default
groupId

SQL Call

exec Teams.DeleteGroup 'groupid'
delete from Teams.group where groupId='groupid'


Http Call

/bsc/teams/deletegroup

Output Columns

This call does not return data.

GetChannel
channel
Get a single Channel in a Team details 

Arguments

Name Description Default
teamId R
channelId R

SQL Call

exec Teams.GetChannel @teamId='teamId',@channelId='channelId'
select * from Teams.channel where teamId='teamId' and channelId='channelId'


Http Call

/bsc/teams/getchannel

Output Columns

String channelId
String teamId
String displayName
String description
ListChannels
channel
List channels in a Team details 

Arguments

Name Description Default
teamId R

SQL Call

exec Teams.ListChannels 'teamId'
select * from Teams.channel where teamId='teamId'


Http Call

/bsc/teams/listchannels

Output Columns

String teamId
String channelId
String displayName
String description
ListGroup
group
Returns the list of existing Team Group details 

Arguments


SQL Call

exec Teams.ListGroup
select * from Teams.group


Http Call

/bsc/teams/listgroup

Output Columns

String groupId
String displayname
String description
DateTime createdDateTime
String mail
Boolean mailEnabled
String mailNickname
DateTime renewedDateTime
String visibility
ListInstalledApp
app
List installed applications details 

Arguments

Name Description Default
teamId R

SQL Call

exec Teams.ListInstalledApp @teamId='teamId'
select * from Teams.app where teamId='teamId'


Http Call

/bsc/teams/listinstalledapp

Output Columns

String id
String teamsAppId
String displayName
String version
ListMember
member
Returns the list of existing group member details 

Arguments

Name Description Default
groupId R

SQL Call

exec Teams.ListMember 'groupId'
select * from Teams.member where groupId='groupId'


Http Call

/bsc/teams/listmember

Output Columns

String memberId
String groupId
String displayName
String givenName
String jobTitle
String mail
String mobilePhone
String officeLocation
String preferredLanguage
String surname
String userPrincipalName
ListMessages
messages
List all channel messages details 

Arguments

Name Description Default
teamId R
channelId R
topn

SQL Call

exec Teams.ListMessages @teamId='teamId',@channelId='ChannelId'
select * from Teams.messages where teamId='teamId' and channelId='channelId'


Http Call

/bsc/teams/listmessages

Output Columns

String id
DateTime createdDateTime
DateTime lastModifiedDateTime
DateTime deletedDateTime
String subject
String importance
String contenttype
String content
String fromuser
String mentionstext
String mentionsuser
ListOwner
owner
Returns the list of owner of the group details 

Arguments

Name Description Default
groupId R

SQL Call

exec Teams.ListOwner 'groupId'
select * from Teams.owner where groupId='groupId'


Http Call

/bsc/teams/listowner

Output Columns

String ownerId
String groupId
String displayName
String givenName
String jobTitle
String mail
String mobilePhone
String officeLocation
String preferredLanguage
String surname
String userPrincipalName
ListTabs
tabs
List Tabs in a channel details 

Arguments

Name Description Default
teamId R
channelId R

SQL Call

exec Teams.ListTabs @teamId='teamId',@channelId='channelId'
select * from Teams.tabs where teamId='teamId' and channelId='channelId'


Http Call

/bsc/teams/listtabs

Output Columns

String tabId
String displayname
ListTeam
team
Returns the list of existing Teams details 

Arguments


SQL Call

exec Teams.ListTeam
select * from Teams.team


Http Call

/bsc/teams/listteam

Output Columns

String teamId
String description
String displayName
Boolean mailEnabled
String mailNickname
String visibility
ListTokens
Tokens
Returns the list of available tokens (requires administrative access to view all tokens) details 

Arguments


SQL Call

exec Teams.ListTokens 
SELECT * FROM Teams.Tokens


Http Call

/bsc/teams/listtokens

Output Columns

String token_type
String accessToken
Double expires_in
DateTime dateAcquired
ListUsers
users
Returns the list of users details 

Arguments


SQL Call

exec Teams.ListUsers 'test'
select * from Teams.users


Http Call

/bsc/teams/listusers

Output Columns

String id
String name
String mobileno
RefreshToken
Forces the creation of a new access token for the current logged in user details 

Arguments


SQL Call

exec Teams.RefreshToken 


Http Call

/bsc/teams/refreshtoken

Output Columns

String token_type
String accessToken
Double expires_in
DateTime dateAcquired
RemoveGroupOwner
owner
remove an owner from a Team Group details 

Arguments

Name Description Default
groupId R
userId R

SQL Call

exec Teams.RemoveGroupOwner 'groupid','memberid'
delete from Teams.owner where groupId='groupid' and memberId='memberid'


Http Call

/bsc/teams/removegroupowner

Output Columns

This call does not return data.

RemoveMember
member
Remove a member from a Team Group details 

Arguments

Name Description Default
groupId R
memberId R

SQL Call

exec Teams.RemoveMember 'groupid','memberid'
delete from Teams.member where groupId='groupid' and memberId='memberid'


Http Call

/bsc/teams/removemember

Output Columns

This call does not return data.

SendMessage
send
Send message to channel details 

Arguments

Name Description Default
teamId R
channelId R
content

SQL Call

exec Teams.SendMessage 'teamid','channelId','content'
insert into Teams.send(teamId,channelId,content) values('teamid','channelid','content here')


Http Call

/bsc/teams/sendmessage

Output Columns

String id
String content
UnarchiveTeam
Unarchive a Team details 

Arguments

Name Description Default
teamId R

SQL Call

exec Teams.Unarchiveteam 'teamId'


Http Call

/bsc/teams/unarchiveteam

Output Columns

This call does not return data.

UpdateChannel
channel
Update a Team Channel details 

Arguments

Name Description Default
teamId
channelId
displayname
description

SQL Call

exec Teams.UpdateChannel 'teamId','channelId','displayname','description'
update Teams.channel set displayname='test',description='description' where teamId='teamId' and channelId='channelId'


Http Call

/bsc/teams/updatechannel

Output Columns

This call does not return data.

UpdateGroup
group
Update a Team Group details 

Arguments

Name Description Default
groupId
displayname R
description
mailNickname

SQL Call

exec Teams.UpdateGroup 'groupId','displayname','description','mailNickName''
update Teams.group set displayname='abc',description='test',mailNickname='test' where groupId='groupId'


Http Call

/bsc/teams/updategroup

Output Columns

This call does not return data.