web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The If-Match header co...
Power Automate
Answered

The If-Match header contain invalid value

(0) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1

I want to update the title of a planner using graph api as per this documentation https://learn.microsoft.com/en-us/graph/api/plannerplan-update?view=graph-rest-1.0&tabs=http  where it mentioned to send this request:-

 

johnjohnPter_0-1709348364535.png

 

 

so i am sending this request using send http action:-

 

 

johnjohnPter_1-1709348415032.png

 

 

but i am getting this error :-

 

johnjohnPter_2-1709348493629.png

I also tried without W/ >> so i only pass this value "JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="  ... but got the same error..

 

 

 

so not sure why it is not accepting the If-Match, although i specify the exact value as per the documentation.

 

any advice?

Thanks

 

Categories:
I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at

    Found this help post with a similar issue and resolution, give it a shot:

    https://stackoverflow.com/questions/56246949/how-to-fix-update-plannertaskdetails-if-match-header-contains-an-invalid-val

    https://powerusers.microsoft.com/t5/Using-Connectors/Custom-Connector-Graph-The-If-Match-header-must-be-specified-for/td-p/144092

    Ensure you are retrieving the etag that is corresponding to your planner instance, using the same one as in the example seems like it should fail. Also try the different variations of escaping the double quotes and see if power automate adds quotes for you as well.

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

      i already read all those links before i posted my question, but none of them worked.. i tried 3 variations:- 

     

    If-Match: W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="

     

    If-Match: "JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="

     

    If-Match: JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc=

     

     

    but none of them worked for me,, any advice please?

    @ivan_apps

  • ivan_apps Profile Picture
    2,187 Moderator on at

    How are you obtaining the IF-Match etag? I don’t believe yours should match the one from the example request.

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

    @ivan_apps I am not obtaining it from anywhere.. i think it need to be provided as-is

  • ivan_apps Profile Picture
    2,187 Moderator on at

    Take a look at the stack overflow article again. The issue maybe isn’t that the format is wrong, rather it doesn’t correspond to anything in your environment. One person resolved the same error message you are getting by using the proper etag they retrieved from ‘task details’ as opposed to ‘tasks’.

     

    retrieve your planner instance and examine the output. See if there is an odata.etag or something similar and use that value instead.

     

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

    @ivan_apps  using this If-Match worked for me:-

     

     

    johnjohnPter_0-1709637982242.png

     

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @johnjohnPter,

     

    I see you are already retrieving the value Id of the field. Are you by any chance using the List plans for a group type of action?

     

    If that is the case, that action is already returning the ETag value and you can dynamically add it to your PATCH request via an expression (so you don't have to worry about the format like when hardcoding the value).

     

    etag_response.png

     

    Below is an example

     

    {
     "Content-Type": "application/json",
     "If-Match": "@{items('Apply_to_each')['@odata.etag']}",
     "Prefer": "return=representation"
    }

     

    etagvalue_plannerplans.png

     

  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at

    @Expiscornovus yes your approach worked perfectly and better than hard coding the value. thanks

  • ivan_apps Profile Picture
    2,187 Moderator on at

    Well done 👍 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard