如何将频道添加到MS团队的自定义应用程序中? [英] How can I get the channels added to my custom app in MS teams?

查看:44
本文介绍了如何将频道添加到MS团队的自定义应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从MS团队的App Studio中创建了一个自定义应用,并添加到了某些频道中现在,我想要使用Microsoft Graph API java sdk在其中添加自定义应用程序的频道列表.

I have created a custom app from app studio in MS teams and added to some of the channel, Now I want the list of channel in which custom app is added using Microsoft Graph API java sdk.

谢谢!!

推荐答案

没有API可以获取添加了您的应用的渠道.

There is no API to get channels where your app has been added.

可能您需要列出所有团队,并且在每个团队中列出属于您的应用的所有频道和每个频道过滤器标签.

Probably, you need to list all teams and inside each team list all channels and inside each channel filter tab belonging to your app.

IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

// get teams
ITeamCollectionPage teams = graphClient.teams()
    .buildRequest()
    .get();

// iterate over each team to get channels
IChannelCollectionPage channels = graphClient.teams("{teamId}").channels()
    .buildRequest()
    .get();

// iterate over each channel and filter tab
ITeamsTabCollectionPage tabs = graphClient.teams("{teamId}").channels("{channelId}").tabs()
.buildRequest()
.filter("teamsApp/id eq 'your_app_id'")
.expand("teamsApp")
.get();

这篇关于如何将频道添加到MS团队的自定义应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆