title: Sharepoint 2013: EnsureUser via REST API
body: <p>I'm trying to ensure some users automatically via REST API.
  My REST call:</p>
  
  <pre><code>$.ajax({
  url: "blablabla/_api/web/ensureuser",
  type: "POST",
  data: "{ 'logonName': 'i%3A0%23.w%7Cdomain%09logonName' }",
  headers: {
      "X-RequestDigest": $("#__REQUESTDIGEST").val(),
      "accept": "application/json;odata=verbose"
  },
  success: function () {
      console.log("done!");
  },
  error: function (err) {
      console.log(JSON.stringify(err));
  }
  });
  </code></pre>
  
  <p>Now when sending this call I get the following error;</p>
  
  <p>"Bad Request: Microsoft.Data.OData.ODataContentTypeException A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) 'application/json;odata=verbose' matches the content type 'application/x-www-form-urlencoded; charset=UTF-8'"</p>
  
  <p>The call is built like <a href="https://msdn.microsoft.com/en-us/library/office/dn499819.aspx" rel="nofollow">in the msdn reference</a> specified.</p>