title: Microsoft Graph REST API to UPDATE Microsoft Planner Tasks?
body: <p>I think this might be a simple quote escape issue, but can’t figure it out.</p>
  <p>I am trying to update a microsoft planner task using CURL with REST API. I can CREATE tasks (from a custom application called FileMaker to Microsoft Planner using Microsoft Graph API) without issue, but when I try to UPDATE a planner task, I get an error that &quot;The If-Match header must be specified for this kind of request.&quot; But I am including the If-Match header, just might not be entering it correctly.</p>
  <p>The URL is:
  &quot;https://graph.microsoft.com/v1.0/planner/tasks/&quot; &amp; $microsoftplannerTaskID</p>
  <p>The CURLOPTIONS, I am entering within FileMaker is ...</p>
  <p>&quot;-X PATCH &quot; &amp;
  &quot; -H &quot;Authorization: Bearer &quot; &amp; $$userToken &amp; &quot;&quot;&quot; &amp;
  &quot; -H &quot;Content-Type: application/json&quot;&quot; &amp;
  &quot; -H &quot;If-Match: &quot; &amp; $microsoftPlannerTasketag &amp; &quot;&quot;&quot; &amp;
  &quot; -d @$PlannerTaskDetails&quot;</p>
  <p>ENDS UP LOOKING LIKE THIS …
  -X PATCH -H &quot;Authorization: Bearer wEXu&lt;&gt;k_QQY&quot; -H &quot;Content-Type: application/json&quot; -H &quot;If-Match: W/&quot;JzEtVGFzayAgQEBAQEBAQBAQEBARCc=&quot;&quot; -d @$PlannerTaskDetails</p>
  <p>When I CREATE the task initially, the response show …
  &quot;@odata.etag&quot;:&quot;W/&quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;&quot;
  Which I am using in the cURL header above.  BUT … I am stripping the W/ and the quotes.  The W/ means it is a “weak”, and I assume we don’t include that in the PATCH header, but I did try adding it anyway with no success.</p>
  <p>Here is Microsoft’s UPDATE PLANNERTASK  reference …
  <a href="https://docs.microsoft.com/en-us/graph/api/plannertask-update?view=graph-rest-1.0&amp;tabs=http" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/graph/api/plannertask-update?view=graph-rest-1.0&amp;tabs=http</a></p>
  <p>I can update tasks using POSTMAN without issue, but I dont know what their header looks like when it sends the request.</p>
  <p>I can get it to work in Postman and in there I have entered for the Plan ETag variable this …
  W/&quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;</p>
  <p>I notice in postman the header shows etag is
  W/&quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;</p>
  <p>And the body returns as
  &quot;@odata.etag&quot;: &quot;W/&quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;&quot;,</p>
  <p>It’s got to be a simple syntax issue with my curloption variable, but I can’t figure it out.</p>
  <p>I also tried removing the W/ in the If-Match header, so it looks like this:
  -H &quot;If-Match: &quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;&quot;</p>
  <p>And the extra quotes in the If-Match header, so it looks like this:
  -H &quot;If-Match: JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;</p>
  <p>All of these result in the same “if-match” error.</p>
  <p>One interesting thing …if I change the If-Match to include a slash in front of the quotes</p>
  <p>-H &quot;If-Match: &quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;&quot;</p>
  <p>I get an error 10 “requested data is missing” in Filemaker’s script debugger and no response from the insert from url statement. Makes sense though, since it is reading this as “if-match: ”</p>
  <p>And same thing if I add the W/ back in
  -H &quot;If-Match: W/&quot;JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=&quot;&quot;
  Gives me error 10 as well</p>
  <p>If you have any thoughts, I would greatly appreciate your help!!</p>