cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
2DM
Frequent Visitor

Bad Request error when extracting ZIP archive to Onedrive folder

I am getting a 'Bad Request' error when I try to unarchive a '.zip' file on Onedrive. 

I tried different things some things like changing the destination path but for some reason, I can't get it to work.

Any suggestions on how to fix this?

 

Schermafbeelding 2021-07-23 om 12.21.33.png

6 REPLIES 6
pre
Community Support
Community Support

Hi @2DM ,

 

May I confirm if you have created flow with the below steps included in it::

 

When a file is created in a folder
Create File 
Extract Archive to folder 

pre_0-1627038236326.png


Try the above and check if that works .If still the same issue , please share some inputs on the flow with any snapshots so that can try to reproduce it at my end and let you know the detail .

 

Thanks



2DM
Frequent Visitor

Hi @pre 

 

I've configured mine a bit differently, please see below. 

The file comes from an HTTP GET request and I've input the body from this request as file contents to create a ZIP file. The original file from the API is a .gz but I think changing it to .zip shouldn't cause any problems. The file actually gets created (I checked) in my Onedrive and when I download it on my PC I can unarchive it without any problems. Within the zip file is a text file I need to get to. 

 

Here's my setup:

Schermafbeelding 2021-07-23 om 13.15.06.png

 

And here are the raw inputs:

{
    "host": {
        "connectionReferenceName": "shared_onedriveforbusiness",
        "operationId": "ExtractFolderV2"
    },
    "parameters": {
        "source": "/Test Flow/streams23_07_2021.zip",
        "destination": "/",
        "overwrite": true
    }
}

 

These are the raw outputs I get:

{
    "statusCode": 400,
    "headers": {
        "Pragma": "no-cache",
        "Transfer-Encoding": "chunked",
        "x-ms-request-id": "b274d167-eeb6-440e-994d-dd5298cf8bb7",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "true",
        "Cache-Control": "no-cache",
        "Date": "Fri, 23 Jul 2021 11:21:36 GMT",
        "X-AspNet-Version": "4.0.30319",
        "X-Powered-By": "ASP.NET",
        "Content-Type": "application/json",
        "Expires": "-1",
        "Content-Length": "147"
    },
    "body": {
        "status": 400,
        "message": "Unable to extract contents of file '/Test Flow/streams23_07_2021.zip'.",
        "source": "api.connectorp.svc.ms"
    }
}
2DM
Frequent Visitor

Hi @pre 

 

I my setup is a little bit different. I get my ZIP file from an HTTP request where I create a file with the body as contents.  When I manually download the created file and unarchive it on my PC, I can do it without any problems.

 

Please see my setup below:

Schermafbeelding 2021-07-23 om 13.36.51.png

 

Here are the raw inputs:

{
    "statusCode": 400,
    "headers": {
        "Pragma": "no-cache",
        "Transfer-Encoding": "chunked",
        "x-ms-request-id": "74607b77-33d2-4bf0-8f16-8c4933e471fc",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "true",
        "Cache-Control": "no-cache",
        "Date": "Fri, 23 Jul 2021 11:37:17 GMT",
        "X-AspNet-Version": "4.0.30319",
        "X-Powered-By": "ASP.NET",
        "Content-Type": "application/json",
        "Expires": "-1",
        "Content-Length": "147"
    },
    "body": {
        "status": 400,
        "message": "Unable to extract contents of file '/Test Flow/streams23_07_2021.zip'.",
        "source": "api.connectorp.svc.ms"
    }
}

Here are the raw outputs:

{
    "statusCode": 400,
    "headers": {
        "Pragma": "no-cache",
        "Transfer-Encoding": "chunked",
        "x-ms-request-id": "74607b77-33d2-4bf0-8f16-8c4933e471fc",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "true",
        "Cache-Control": "no-cache",
        "Date": "Fri, 23 Jul 2021 11:37:17 GMT",
        "X-AspNet-Version": "4.0.30319",
        "X-Powered-By": "ASP.NET",
        "Content-Type": "application/json",
        "Expires": "-1",
        "Content-Length": "147"
    },
    "body": {
        "status": 400,
        "message": "Unable to extract contents of file '/Test Flow/streams23_07_2021.zip'.",
        "source": "api.connectorp.svc.ms"
    }
}

 

pre
Community Support
Community Support

Hi @2DM ,

 

Thank you for sharing the detail . The status code 400 indicates an invalid request been sent . Please check with a different URI definition . You can also check by entering the URI information instead of selecting the dynamic content . 

To isolate the issue more , can you please share the failed flow URL from the edit screen of the flow in run history .

 

Thanks

2DM
Frequent Visitor

I've checked and the problem isn't with the URI information. 

 

Here's the failed flow URL:

https://emea.flow.microsoft.com/manage/environments/Default-7e131bef-6163-417e-8913-eb8a434e87af/flo...

pre
Community Support
Community Support

Hi @2DM ,


Thank you for sharing the flow URL. I see that the there is a failure happening for the API ID -  onedriveforbusiness . And backend URL is "https://api.connectorp.svc.ms/datasets/default/extractFolderV2?source=_&destination=_&overwrite=_" 

You might need to check with your admin if there is any restriction policy applied in regards to onedrivefor business API call .

Thanks

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,905)