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 / Office 365 Groups - Se...
Power Automate
Unanswered

Office 365 Groups - Send an HTTP request: Error when sending custom headers with quotes

(1) ShareShare
ReportReport
Posted on by 18

I'm using the Office 365 Groups "Send an HTTP request" action in a Flow to send a MS Graph request:

DELETE https://graph.microsoft.com/v1.0/planner/plans/{plan-id}

If-Match: W/"JzEtUGxhbiAgQEBAQEBAQEBAQEBAQEBARCc="

 

This request requires the etag of the plan be sent by way of an If-Match request header.  I can successfully send the request through Graph Explorer.  But when I send the identical request through this connector, it seems it cannot handle the double quotes within the etag string.  I've tried non-escaped and escaped quotes as well as wrapping the etag string in single quotes.  The connector errors are either "If-Match header must be specified" or "the identifier is invalid".

Any suggestions would be appreciated.  Thanks!

Categories:
I have the same question (0)
  • murshed Profile Picture
    Microsoft Employee on at

    You may not be able to escape string literal. I just want to point something to try. It may or not work.

    https://docs.microsoft.com/en-us/connectors/custom-connectors/policy-templates/setheader/setheader

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

  • khansen Profile Picture
    5 on at

    I have this issue too. 

     

    This is not a custom connector. This is the Office Groups Connector (Microsoft), HTTP request action (Preview)

    khansen_0-1638796553855.png

    When sent, the CustomHeader1 field wants a string in the format: header-name: header-value

    If-Match must be double quote enclosed string (or comma separated list of double quoted strings, or "*").  The expected sent Header would be:

    Content-Type: application/json
    If-Match: W/"randomstringofcharacters"
    Prefer: return=representation

    or in JSON representation:

    {
    "Content-Type": "application/json",
    "If-Match": "W/\"randomstringofcharacters\",
    "Prefer": "return=representation"
    }

    Using the above in Graph Explorer works as expected.

     

    The raw inputs for this action are look like this 

    khansen_0-1638799398337.png

     

    My guess is that the CustomHeader fields split a string on the ":" then build a header object with the Header-Name and Header-Value, then the value is parsed and what comes out is a header value with the escapes included looking like this:

    Content-Type: application/json,
    If-Match: W/\"randomstringofcharacters\"
    Prefer: return=representation

    or in JSON representation:

    {
    "Content-Type": "application/json",
    "If-Match": "W/\\\"randomstringofcharacters\\\",
    "Prefer": "return=representation"
    }

    Most headers do not require double quotes as part of the value sent, so my bet is If-Match wasn't handled differently than other headers where splitting a string and popping in the values would work fine.

     

    Other HTTP actions handle this without issue by allowing input of Header Name and Value as separate items (this also allows as many headers as needed)

    khansen_2-1638798573429.png

    Or by allowing JSON object input for the headers. Maybe implementing this method of Header entry could address this issue.

  • khansen Profile Picture
    5 on at

    This is an action on a Microsoft Connector, we cannot customize the template.

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard