Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Custom Connector for Graph API with Pagination

(1) ShareShare
ReportReport
Posted on by 17

I've set up a custom connector to interface with Graph API using an azure app. Everything works fine except for trying to enable pagination - from what I've read all you need to add is an x-ms-pageable value via the swagger editor, and it should handle everything automatically. Unfortunately, Power Automate throws an InvalidAuthenticationToken (IDX14100: JWT is not well formed)

whenever it tries to use pagination (disabling it, or returning under 20 records works fine)

 

matthudson_0-1692275687951.png

 

Before I go and rewrite everything to use skiptoken as an input (because that'll be a lot of work on the flow end to get all the records I want), has anyone had any luck getting this to work as it should?

  • Imke Profile Picture
    Imke 281 on at
    Re: Custom Connector for Graph API with Pagination

    Hi @matthudson ,
    pagination is working for me now: https://github.com/microsoft/PowerPlatformConnectors/issues/2959#issuecomment-1821632116

     

  • matthudson Profile Picture
    matthudson 17 on at
    Re: Custom Connector for Graph API with Pagination

    Yep, same error here. No luck yet with Microsoft support; I had to put the ticket on hold due to other priorities at work, but when I pick it back up and we get it fixed I'll update the thread

  • Imke Profile Picture
    Imke 281 on at
    Re: Custom Connector for Graph API with Pagination

    Actually, my excitement was a bit premature.
    When enabling "Pagination" in the setting as you have described @matthudson , I am getting 401 "CompactToken parsing failed with error code: 80049217".
    Is that what you are seeing as well?

  • Imke Profile Picture
    Imke 281 on at
    Re: Custom Connector for Graph API with Pagination

    Thanks @matthudson ,
    that was it!
    Could swear, this setting wasn't there before - but hey, it was a long day... that you saved at last thankfully 🙂

  • matthudson Profile Picture
    matthudson 17 on at
    Re: Custom Connector for Graph API with Pagination

    All you've done is tell your custom connector that it supports pagination; until you enable it on your flow block it'll ignore any nextlink and continue to only return the first page. 

  • Imke Profile Picture
    Imke 281 on at
    Re: Custom Connector for Graph API with Pagination

    Thanks @matthudson ,
    but my question was for a custom connector. Those actions don't show the pagination feature from your screenshot.

  • matthudson Profile Picture
    matthudson 17 on at
    Re: Custom Connector for Graph API with Pagination

    You'll need to enable pagination in the settings for the block in the flow:

    matthudson_0-1700430658713.png

     

    I've tested and it's still broken, unfortunately

  • Imke Profile Picture
    Imke 281 on at
    Re: Custom Connector for Graph API with Pagination

    I don't get any error message (querying emea.api.flow.microsoft.com), but pagination isn't happening: Only 50 rows are returned and the nextLink.
    All did in the Swagger editor was to add this code bit:

     

     

    x-ms-pageable:
    nextLinkName: 'nextLink'

     

     

    Should this work or am I missing something here?


     

     

  • matthudson Profile Picture
    matthudson 17 on at
    Re: Custom Connector for Graph API with Pagination

    Sorry, no update yet. Ticket opened with Microsoft, will let you know when I have a fix

  • __2A Profile Picture
    __2A 6 on at
    Re: Custom Connector for Graph API with Pagination

    I have exactly the same problem. Disabling pagination the connector works just fine. And using the "HTTP" action with the pagination option enabled works too.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics