title: Office 365 REST API (Python) Mark Email as Read
body: <p>I'm sure I'm doing something simple wrong, but I can't for the life of me figure out how to set the "IsRead" property to true. It's the last step of my process that gets a filtered list of messagesa and stores and processes any attachments. </p>
  
  <p>According to the docs "IsRead" is writable: <a href="http://msdn.microsoft.com/office%5Coffice365%5CAPi/complex-types-for-mail-contacts-calendar#ResourcesMessage" rel="noreferrer">http://msdn.microsoft.com/office%5Coffice365%5CAPi/complex-types-for-mail-contacts-calendar#ResourcesMessage</a></p>
  
  <p><a href="http://msdn.microsoft.com/office%5Coffice365%5CAPi/mail-rest-operations#MessageoperationsUpdatemessages" rel="noreferrer">http://msdn.microsoft.com/office%5Coffice365%5CAPi/mail-rest-operations#MessageoperationsUpdatemessages</a></p>
  
  <p>I'm using python 2.7 and the requests module:</p>
  
  <pre><code># once file acquired mark the email as read
  params = {'IsRead':'True'}
  base_email_url = u'https://outlook.office365.com/api/v1.0/me/messages/{0}'.format( msgId )
  response = requests.patch(base_email_url, params, auth=(email,pwd))
  log.debug( response )
  </code></pre>
  
  <p>The response that comes back is this:</p>
  
  <pre><code>{"error":{"code":"ErrorInvalidRequest","message":"Cannot read the request body."}}
  </code></pre>
  
  <p>What's the problem with my request?</p>