me.message

Get attachment

Read the properties, relationships, or raw contents of an attachment attached to a user message. An attachment can be one of the following types: fileAttachment, itemAttachment, or referenceAttachment.

get/me/messages/{messageId}/attachments/{attachmentId}

Query parameters

$selectstring[]

Select properties to be returned

$expandstring[]

Expand related entities

Response

Retrieved attachment

@odata.typestring
idstring

The unique identifier for an entity. Read-only

lastModifiedDateTimestring date-time nullable

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

sizenumber

The length of the attachment in bytes

namestring nullable

The attachment's file name

isInlineboolean

true if the attachment is an inline attachment; otherwise, false

contentTypestring nullable

The MIME type

contentBytesstring base64url nullable

The base64-encoded contents of the file attachment. Required only for file attachments

Changes

Changed in 4 of the 10 revisions of this API.121

    • added the optional property allOf[subschema #2: attachment]/contentBytes to the response with the 2XX status

      response-optional-property-added

    • api operation id me.messages.GetAttachments removed and replaced with getAttachment

      api-operation-id-removed

    • mapped value for discriminator key #microsoft.graph.attachment changed from microsoft.graph.attachment to MicrosoftGraphAttachment for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.fileAttachment changed from microsoft.graph.fileAttachment to MicrosoftGraphAttachment for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.fileAttachment changed from microsoft.graph.fileAttachment to MicrosoftGraphAttachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.itemAttachment changed from microsoft.graph.attachment to MicrosoftGraphAttachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.mailFolder changed from microsoft.graph.mailFolder to MicrosoftGraphMailFolder for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.mailSearchFolder changed from microsoft.graph.mailSearchFolder to MicrosoftGraphMailFolder for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.message changed from microsoft.graph.message to MicrosoftGraphMessage for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.outlookItem changed from microsoft.graph.outlookItem to MicrosoftGraphOutlookItem for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.referenceAttachment changed from microsoft.graph.attachment to MicrosoftGraphAttachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

  • c6fc1d98f528110See the full diff
    • removed the optional property allOf[subschema #2: attachment]/contentBytes from the response with the 2XX status

      response-optional-property-removed

    • api operation id getAttachment removed and replaced with me.messages.GetAttachments

      api-operation-id-removed

    • mapped value for discriminator key #microsoft.graph.attachment changed from MicrosoftGraphAttachment to microsoft.graph.attachment for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.fileAttachment changed from MicrosoftGraphAttachment to microsoft.graph.fileAttachment for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.fileAttachment changed from MicrosoftGraphAttachment to microsoft.graph.fileAttachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.itemAttachment changed from MicrosoftGraphAttachment to microsoft.graph.attachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.mailFolder changed from MicrosoftGraphMailFolder to microsoft.graph.mailFolder for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.mailSearchFolder changed from MicrosoftGraphMailFolder to microsoft.graph.mailSearchFolder for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.message changed from MicrosoftGraphMessage to microsoft.graph.message for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.outlookItem changed from MicrosoftGraphOutlookItem to microsoft.graph.outlookItem for allOf[subschema #1: entity]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed

    • mapped value for discriminator key #microsoft.graph.referenceAttachment changed from MicrosoftGraphAttachment to microsoft.graph.attachment for allOf[subschema #2: attachment]/ response property for the response status 2XX

      response-property-discriminator-mapping-changed