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

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

问题描述

我从 MS 团队的应用工作室创建了一个自定义应用,并添加到了一些频道中,现在我想要使用 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天全站免登陆