使用图形将 TeamsTab 添加为常规频道中的第一个选项卡

add TeamsTab as the first tab in the general channel using graph

我有工作代码可以将选项卡添加到创建的每个团队的“常规”频道。用户希望该选项卡成为“常规”频道的第一个(默认) 有办法吗?

    var channels = await graphClient.Teams[groupID].Channels.Request().Filter("displayName eq 'General'").GetAsync();
    var teamsTab = new TeamsTab
    {
        DisplayName = "Project KickOff",
        Configuration = new TeamsTabConfiguration
        {
            ContentUrl = $"https://{domain}/main.aspx?id={project.ProjectKickOff}",
            WebsiteUrl = $"https://{domain}/main.aspx?id={project.ProjectKickOff}"
        },
        AdditionalData = new Dictionary<string, object>()
        {
            {"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.web"}
        }
    };
    TeamsTab tab = await graphClient.Teams[groupID].Channels[channels[0].Id].Tabs.Request().AddAsync(teamsTab);

谢谢

从答案部分添加以获得更多可见性:

添加标签时似乎没有任何方法可以添加任何排序顺序。