是否有 API 端点来查找专用通道的驱动器

Seb*_*ald 2 microsoft-teams microsoft-graph-api

我们正在考虑在我们的组织中创建团队,并在文件选项卡中预填充文件夹结构。

对于普通频道,这很容易,因为文件位于组根 SharePoint 中以频道命名的目录中。因此,我们可以向 https://graph.microsoft.com/beta/groups/{group-id}/drive/items/root/children端点发出 POST 请求并为通道创建文件夹。来自端点的答案包含新文件夹的 ID,我们可以使用此 ID 继续为通道创建文件夹结构。

然而,私人频道位于 SharePoint 组之外。

https://graph.microsoft.com/beta/teams/{id}/channels问题是,是否有可能使用创建专用通道的 POST 调用提供的信息获取驱动器的根目录?

Mar*_*eur 6

Channel 资源有一个记录在案的filesFolder导航属性,称为。从 Graph v1.0 端点:

<EntityType Name="channel" BaseType="microsoft.graph.entity">
  <Property Name="displayName" Type="Edm.String"/>
  <Property Name="description" Type="Edm.String"/>
  <Property Name="isFavoriteByDefault" Type="Edm.Boolean"/>
  <Property Name="email" Type="Edm.String"/>
  <Property Name="webUrl" Type="Edm.String"/>
  <Property Name="membershipType" Type="microsoft.graph.channelMembershipType"/>
  <NavigationProperty Name="messages" Type="Collection(microsoft.graph.chatMessage)" ContainsTarget="true"/>
  <NavigationProperty Name="chatThreads" Type="Collection(microsoft.graph.chatThread)" ContainsTarget="true"/>
  <NavigationProperty Name="tabs" Type="Collection(microsoft.graph.teamsTab)" ContainsTarget="true"/>
  <NavigationProperty Name="members" Type="Collection(microsoft.graph.conversationMember)" ContainsTarget="true"/>
  <NavigationProperty Name="filesFolder" Type="microsoft.graph.driveItem" ContainsTarget="true"/>
</EntityType>
Run Code Online (Sandbox Code Playgroud)

您可以使用此模板来调用它:

/v1.0/teams/{teamId}/channels/{channelId}/filesFolder
Run Code Online (Sandbox Code Playgroud)

这将返回与专用频道关联的驱动器:

/v1.0/teams/{teamId}/channels/{channelId}/filesFolder
Run Code Online (Sandbox Code Playgroud)