title: HTTP error 405 when trying to create an apload session with MS Graph API
body: <p>I am trying to upload a large attachment with Microsoft Graph Rest API.
  I am able to create an upload session and attach a large file &gt; 3 Mo (file attachment) but when i try to create an upload session to attach an item with a size &gt; 3 Mo to a mail, it fails with an error 405. The Reason is because i'm setting the attachment type to &quot;item&quot; instead of &quot;file&quot;. When i try to POST to the API endpoint the Following payload (for testing):</p>
  <pre><code>{&quot;AttachmentItem&quot;:{&quot;attachmentType&quot;:&quot;item&quot;,&quot;name&quot;:&quot;flower&quot;,&quot;size&quot;:3483322}}
  </code></pre>
  <p>The response (with a 405 status) is:</p>
  <pre><code>{&quot;error&quot;:{&quot;code&quot;:&quot;ErrorAttachmentSessionIsSupportedOnlyForFileAttachments&quot;,&quot;message&quot;:&quot;Unsupported Attachment type specified. Only File attachments can be uploaded using an Upload Session.&quot;,&quot;innerError&quot;:{&quot;date&quot;:&quot;2020-12-09T16:03:11&quot;,&quot;request-id&quot;:&quot;ded65db1-179f-45bd-89ba-e5527556f359&quot;,&quot;client-request-id&quot;:&quot;f6befc74-8399-227d-3686-bf2a62297a44&quot;}}}
  </code></pre>
  <p>Normally the <strong>&quot;item&quot;</strong> attachment type should be supported according to the documentation (<a href="https://docs.microsoft.com/en-us/graph/api/resources/attachmentitem?view=graph-rest-1.0" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/resources/attachmentitem?view=graph-rest-1.0</a>).</p>
  <p>Any clue on this ?</p>
  <p>Thx</p>