cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Custom Connector - Graph - The If-Match header must be specified for this kind of request

I would like to do a PATCH against the Microsoft Graph API, e.g. https://graph.microsoft.com/v1.0/planner/tasks/{task-id}

 

Unfortunately, the Custom Connector wraps the If-Match Header in quotes which causes Graph to return a 412: "The If-Match header must be specified for this kind of request". This is the header that it generates:

 

{
  "Authorization": "Bearer eyJ0eXA...",
  "Content-type": "application/json",
  "If-Match": "W/\\\"JzEtVGFza0Rld...TCc=\\\""
}

In the Graph Explorer, if I wrap the If-Match Header value in quotes I repro the same result.

 

So, it looks like the root cause is the fact that the Custom Connector is wrapping the etag in quotes is the problem. I've tried all of the other data types for the Header values, and it wraps them all in quotes.

 

Seems a pretty basic thing to me (to do a PATCH to the Graph) - what am I missing please community!

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Custom Connector - Graph - The If-Match header must be specified for this kind of request

I found my own answer: my problem was the weak etag syntax that I was using. It does not like this:

 

W/\"JzEtVG...TCc=\"

 

nor does it like this:

 

JzEtVG...TCc=

 

but it does like this:

 

"JzEtVG...TCc"

 

which it (double, escape) wraps in quotes to looks like this, and which works.  

{
  "Authorization": "Bearer eyJ0e...",
  "Content-type": "application/json",
  "If-Match": "\"JzEtVG...TCc=\""
}

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Custom Connector - Graph - The If-Match header must be specified for this kind of request

I found my own answer: my problem was the weak etag syntax that I was using. It does not like this:

 

W/\"JzEtVG...TCc=\"

 

nor does it like this:

 

JzEtVG...TCc=

 

but it does like this:

 

"JzEtVG...TCc"

 

which it (double, escape) wraps in quotes to looks like this, and which works.  

{
  "Authorization": "Bearer eyJ0e...",
  "Content-type": "application/json",
  "If-Match": "\"JzEtVG...TCc=\""
}

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 403 members 5,282 guests
Recent signins:
Please welcome our newest community members: