MACMAN
MACMAN

Reputation: 1971

Why I am getting the following unsupported media error while trying to send the email using graph api?

415 Unsupported Media Type Date: Wed, 21 Jul 2021 04:58:47 GMT Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8 Cache-Control: private Transfer-Encoding: chunked Strict-Transport-Security: max-age=31536000 request-id: 64efc176-cf5d-4e4a-bc56-34d4fad3fc40 client-request-id: 64efc176-cf5d-4e4a-bc56-34d4fad3fc40 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"BY1PEPF00003215"}} {"error":{"code":"RequestBodyRead","message":"A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, >>>>Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaType, Microsoft.OData.ODataMediaTyp...' matches the content type 'text/html'."}}

Upvotes: 1

Views: 3809

Answers (1)

MACMAN
MACMAN

Reputation: 1971

I finally got it resolved when I used application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false in content type. Maybe it will help somebody in future.

Upvotes: 3

Related Questions