title: How to correctly send a PATCH request
body: <p>I need to call this REST endpoint</p>
  
  <pre><code>PATCH https://graph.windows.net/contoso.onmicrosoft.com/users/username@contoso.onmicrosoft.com?api-version=1.5 HTTP/1.1
  
  {
      "&lt;extensionPropertyName&gt;": &lt;value&gt;
  }
  </code></pre>
  
  <p>Please see documentation here: <a href="https://msdn.microsoft.com/en-us/library/azure/dn720459.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/azure/dn720459.aspx</a></p>
  
  <p>I have the following code to set the value of one property for a user:</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; AddExtensionPropertyValueToUser()
          {
              Uri serviceRoot = new Uri(azureAdGraphApiEndPoint);
              var token = await GetAppTokenAsync();
              string requestUrl = "https://graph.windows.net/mysaasapp.onmicrosoft.com/users/usuario1@mysaasapp.onmicrosoft.com?api-version=1.5";
  
              HttpClient hc = new HttpClient();
                  hc.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
  
              var method = new HttpMethod("PATCH");
  
              var request = new HttpRequestMessage(method, requestUrl)
              {
                  Content =  new StringContent("{ \"extension_33e037a7b1aa42ab96936c22d01ca338_Compania\": \"Empresa1\" }", Encoding.UTF8, "application/json")
              };
  
              HttpResponseMessage hrm = await hc.GetAsync(new Uri(requestUrl));
              if (hrm.IsSuccessStatusCode)
              {
                  string jsonresult = await hrm.Content.ReadAsStringAsync();
                  return View("TestRestCall", new SuccessViewModel
                  {
                      Name = "The Title",
                      Message = "The message",
                      JSON = jsonresult.ToJson()
                  });
              }
              else
              {
                  return View();
              }
          }
  </code></pre>
  
  <p>However instead of respongint with 204 (No content), its responding with the entire user properties, so I guess something is wrong with my rest CALL</p>
  
  <p><a href="http://screencast.com/t/LmoNswKIf2" rel="noreferrer">http://screencast.com/t/LmoNswKIf2</a></p>