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

Community site session details

Session Id : Kb4df0F9OCbWqpyzhUDayx
Power Automate - Building Flows
Unanswered

Content-Range header missing error in HTTP request but it isn't

Like (0) ShareShare
ReportReport
Posted on 25 Oct 2021 12:41:22 by 8

Hi, 

I'm attempting to create a flow that uses Universal Print, i get to the point of getting the document upload url, i then do a put HTTP request within power automate with the Content-Range and Content-Type headers set. However it gives an error back saying that the Content-Range header is missing, even though you can see it in the request headers. I have tried this exact same thing with postman and it works fine so it's not a problem with the HTTP request generally but something with power automate. I've attached an image of the error. 

powerautomateerror.png

 

I have the same question (0)
  • ccg_apl Profile Picture
    26 on 22 Oct 2022 at 02:40:22
    Re: Content-Range header missing error in HTTP request but it isn't

    Well, I gave up and decided to use PrintNode instead. It took about 30 minutes to set up and it's working great.

  • ccg_apl Profile Picture
    26 on 21 Oct 2022 at 16:26:17
    Re: Content-Range header missing error in HTTP request but it isn't

    Thanks, I found that article shortly after I posted. What's so incredibly frustrating is that Power Automate strips this header out, yet Universal Print requires the header in step 3 (uploading content). So invoking Universal Print from Power Automate does not seem possible.

     

    What I'm attempting now is writing my own web service and custom connector and passing it the binary from Power Automate. Of course, binary isn't an option when creating a custom connector through the UI, but it *is* an option if you use the Swagger editor. Another topic in this forum pointed me to this:

    https://github.com/microsoft/PowerPlatformConnectors/blob/8e8702daa846d3d35755971282947347dba2931d/custom-connectors/ServiceNow/apiDefinition.swagger.json#L530

     

    I'm now stuck on authentication issues. I can invoke my web service through the custom connector, but it doesn't propagate the user's identity, so either a) it doesn't authenticate to my web service properly, or b) it authenticates as a service, not as the specific user, but the graph API for creating a print job doesn't support application permissions.

     

    I'm hoping to work through that today. If/when I get it figured out, I'll post an update.

  • Expiscornovus Profile Picture
    32,539 Most Valuable Professional on 21 Oct 2022 at 06:09:44
    Re: Content-Range header missing error in HTTP request but it isn't

    Hi @Bas12 ,

     

    As far as I am aware some HTTP headers are omitted in the HTTP action. Content-Range is one of them. You might want to check if the ones you are using are listed in te same doc.

     

    So, it would simply be removed from your request. And that might explain why you are getting a message that it is missing.

     

    https://docs.microsoft.com/en-us/azure/connectors/connectors-native-http#omitted-http-headers

  • Bas12 Profile Picture
    12 on 21 Oct 2022 at 05:40:06
    Re: Content-Range header missing error in HTTP request but it isn't

    @ccg_apl: unfortunately I didn't find a solution yet 

  • ccg_apl Profile Picture
    26 on 21 Oct 2022 at 00:44:45
    Re: Content-Range header missing error in HTTP request but it isn't

    Did you ever get a resolution for this? I'm facing this problem now, too.

  • Bas12 Profile Picture
    12 on 04 Dec 2021 at 14:04:58
    Re: Content-Range header missing error in HTTP request but it isn't

    Of course @VictorIvanidze, I appreciate all suggestions which can contribute to solving the problem.

  • VictorIvanidze Profile Picture
    12,685 on 04 Dec 2021 at 12:57:34
    Re: Content-Range header missing error in HTTP request but it isn't

    Please forgive me, I gave you a wrong suggestion. "Send an HTTP request" action can work only with Microsoft Graph REST API .

  • Bas12 Profile Picture
    12 on 04 Dec 2021 at 12:47:18
    Re: Content-Range header missing error in HTTP request but it isn't

    Hello @VictorIvanidze , 

     

    I used the following input:

    {
        "host": {
            "connectionReferenceName""shared_office365groups",
            "operationId""HttpRequest"
        },
        "parameters": {
            "Method""GET",
            "CustomHeader1""Accept-Crs: epsg:28992",
            "CustomHeader2""X-Api-Key: XXXXXXXX"
        }
    }
    Bas12_0-1638621962574.png

     

    This is the output:
    {
      "error": {
        "code"400,
        "message""URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource is not one of the supported (me, users, groups, sites, search, planner, teams, chats): https://api.bag.acceptatie.kadaster.nl/lvbag/individuelebevragingen/v2/adressenuitgebreid?postcode=2594AN&huisnummer=265&exacteMatch=true",
        "source""europe-002.azure-apim.net",
        "path""choose[9]\\when[1]",
        "policyId""",
        "clientRequestId""71a6662a-3823-40a7-9c84-010e0b81035d"
      }
    }
    Did I use the connector correct?
  • VictorIvanidze Profile Picture
    12,685 on 04 Dec 2021 at 11:54:04
    Re: Content-Range header missing error in HTTP request but it isn't

    What URL did you use?

  • Bas12 Profile Picture
    12 on 04 Dec 2021 at 11:30:10
    Re: Content-Range header missing error in HTTP request but it isn't

    Hello @VictorIvanidze,

     

    Thanks a lot for your advice! I've tried it right away. Unfortunately I get the following error/response:

     

    URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource is not one of the supported (me, users, groups, sites, search, planner, teams, chats)

     

    It seems that the suggested alternative connector can only be used in combination with Office365 products?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading complete