C# 如何获取创建的团队Uri?
因此,我正在创建Microsoft.Graph组和团队。而且似乎它们是成功创建的。问题是我无法创建团队Uri 具有新组id的Rest请求如下所示:C# 如何获取创建的团队Uri?,c#,microsoft-graph-api,C#,Microsoft Graph Api,因此,我正在创建Microsoft.Graph组和团队。而且似乎它们是成功创建的。问题是我无法创建团队Uri 具有新组id的Rest请求如下所示: RestClient client = new RestClient("https://graph.microsoft.com/beta/groups/" + groupId + "/endpoints"); RestRequest request = new RestRequest(Method.GET); request.AddHeader("A
RestClient client = new RestClient("https://graph.microsoft.com/beta/groups/" + groupId + "/endpoints");
RestRequest request = new RestRequest(Method.GET);
request.AddHeader("Authorization", accessToken);
IRestResponse response = await client.ExecuteTaskAsync(request, new CancellationToken());
MS团队以以下格式生成链接(
Get link to team
menu action):
https://teams.microsoft.com/l/team/19%3a{channel-id}%40thread.skype/conversations?groupId={group-id}&tenantId={tenant-id}
创建团队后,可以通过端点检索通道id:
GET: https://graph.microsoft.com/beta/groups/{group-id}/channels
要确定租户id
,您可以参考
文章
示例
static string GetTeamLink(string groupId, string channelId,string tenantId = null)
{
return
String.Format("https://teams.microsoft.com/l/team/19%3a{0}%40thread.skype/conversations?groupId={1}&tenantId={2}",
channelId.Replace("-", string.Empty),
groupId,
tenantId);
}