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 / Error Header 'x-ms-api...
Power Automate
Unanswered

Error Header 'x-ms-apim-tokens' not found when listing files in a folder using onedrive connector

(0) ShareShare
ReportReport
Posted on by

My flow is extremly simple, I have a manual trigger which list all files in a folder using onedrive connector.

 

There are 7000+ files in the folder so I have turned pagination on. The settings can be seen below

 

If I turn the pagination off it works and lists 20 files. If I turn it on I get the error below

 

 

Does anybody know where am I going wrong?

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @ak1,

     

    Could you please share a screenshot of your flow's configuration?

     

    I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:1.JPG

     

    2.JPG

    Note: I have enabled the Pagination option within the "List files in folder" action.

     

    The flow works successfully as below:3.JPG

     

    Please consider take a try to remove this action and re-add it again to check if the issue is solved. In addition, please also take a try to re-create a new connection to this connector and try the action again on your side. 

     

    The user @DanielNunes has faced same issue with you, please check the response within the following thread:

    https://powerusers.microsoft.com/t5/I-Found-A-Bug/quot-x-ms-apim-tokens-quot-header-was-not-found/td-p/29306

     

    More details about the Pagination option within settings, please check the following article:

    https://flow.microsoft.com/en-us/blog/four-connector-action-settings/

     

     

    Best regards,

    Kris

     

  • Verified answer
    ak2 Profile Picture
    17 on at

    Hi Kris,

     

    Thank you for such a detailed response. 

     

    My flow configuration is as follows, followed by the settings for listing the files

     

     

     

    Please consider take a try to remove this action and re-add it again to check if the issue is solved.

    Did not work 😞

     

    In addition, please also take a try to re-create a new connection to this connector and try the action again on your side. 

    Did not work 😞

     

    https://powerusers.microsoft.com/t5/I-Found-A-Bug/quot-x-ms-apim-tokens-quot-header-was-not-found/td-p/29306

    The solution here was just to delete and try again which I've already done

     

    If the folder has less than 20 items then it works fine. So I'm assuming the error is only there when pagination is there.

  • whyonearth Profile Picture
    126 on at

    Leaving this here for anyone with a similar but distinct issue:

     

    I had this same error in a child flow that was caused by run-only user permissions for the sharepoint connector, and when I changed that to use a different connection (from "Provided by run-only user" to "blahblah@companyname.com") it started working.

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard