0

Has anyone been able to post a conversation with an attachment to a group using the unified api?

I have been able to post conversations to a group with no attachments ( using examples at https://msdn.microsoft.com/office/office365/HowTo/groups-rest-operations#PostToGroup) but haven't been able to figure out or find examples on how to do it with attachments.

At the bottom of the page specified in the URL above there is information on the Post object with the Attachments property but there is no link to follow to see what the Attachments object looks like.

mike w
  • 101
  • 1
  • 10

1 Answers1

0

I haven't tried it, but you can see the metadata for the Unified API by going to https://graph.microsoft.com/beta/$metadata. From looking at that, it seems the structure of the Attachment entity is the same as the Attachment entity in the Outlook APIs.

The relevant bits of the metadata:

<EntityType Name="Attachment">
  <Key>
    <PropertyRef Name="Id"/>
  </Key>
  <Property Name="Id" Unicode="false" Type="Edm.String" Nullable="false"/>
  <Property Name="Name" Unicode="false" Type="Edm.String"/>
  <Property Name="ContentType" Unicode="false" Type="Edm.String"/>
  <Property Name="Size" Type="Edm.Int32" Nullable="false"/>
  <Property Name="IsInline" Type="Edm.Boolean" Nullable="false"/>
  <Property Name="DateTimeLastModified" Type="Edm.DateTimeOffset"/>
</EntityType>

<EntityType Name="FileAttachment" BaseType="Microsoft.Graph.Attachment">
  <Property Name="ContentId" Unicode="false" Type="Edm.String"/>
  <Property Name="ContentLocation" Unicode="false" Type="Edm.String"/>
  <Property Name="IsContactPhoto" Type="Edm.Boolean" Nullable="false"/>
  <Property Name="ContentBytes" Type="Edm.Binary"/>
</EntityType>

<EntityType Name="ItemAttachment" BaseType="Microsoft.Graph.Attachment">
  <NavigationProperty Name="Item" Type="Microsoft.Graph.OutlookItem" Nullable="false" ContainsTarget="true"/>
</EntityType>
Jason Johnston
  • 17,194
  • 2
  • 20
  • 34