【问题标题】:How to create teams with team template by using C# SDK?如何使用 C# SDK 使用团队模板创建团队?
【发布时间】:2021-02-09 09:29:13
【问题描述】:

虽然documentation 解释了如何使用原始 HTTP 请求创建具有team template 的团队,但我找不到使用 Graph SDK 的开箱即用解决方案。

我能找到的最佳匹配是:

serviceClient.Teams.Request().AddAsync(new Team { Template = new TeamsTemplate { Id = "???", ODataType = "???" } });

但插入模板名称如standardeducationClass 在上述给定请求中的任何位置都不起作用。那么有没有关于如何使用 SDK 形成请求的文档?

【问题讨论】:

    标签: c# microsoft-graph-api microsoft-graph-sdks microsoft-graph-teams


    【解决方案1】:

    我正在使用这个请求来创建一个带有模板的团队:

    await client.Teams.Request().AddAsync(
          new Team
          {
              DisplayName = "My team",
              Description = "desc",
              AdditionalData = new Dictionary<string, object>()
              {
                  {"template@odata.bind", "https://graph.microsoft.com/v1.0/teamsTemplates('standard')"}
              }
          });
    

    如果您的方法不起作用,请查看此thread 以了解解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-09
      • 1970-01-01
      • 1970-01-01
      • 2016-09-03
      • 1970-01-01
      • 1970-01-01
      • 2020-07-10
      相关资源
      最近更新 更多