ADF - Pagination with Headers not working correctly

Aleix 5 Reputation points
2024-01-31T11:14:33.1033333+00:00

Hello, I'm trying to list all our users by using the following API [1]. I already created the REST linked service and when testing by creating a dataflow and clicking on "Data preview", I can see some rows. The API response has a limit of 200 and we have thousands of users, so we have to work with Pagination. The next page is located in the response's headers, it doesn't appear in the response's body. This would be an example of what I see in Postman <https://xxx-xxx.okta.com/api/v1/users?after=12asd34&limit=200>; rel="next" This is my current configuration for the Source Activity inside my dataflow. Screenshot 2024-01-31 at 12.00.10 Then, when I preview the data, I receive the following error: Job aborted due to stage failure: Task 0 in stage 246.0 failed 1 times, most recent failure: Lost task 0.0 in stage 246.0 (TID 189) (vm-82869784 executor 1): com.microsoft.dataflow.Issues: DF-Rest_015 - Failure to read most recent page request: Illegal character in scheme name at index 0: <https://xxx-xxx.okta.com/api/v1/users?limit=200>; rel="self" If I remove the Pagination rule and preview the data again, when I see the key link , https://xxx-xxx.okta.com/api/v1/users?limit=200> is not there. Screenshot 2024-01-31 at 12.05.33

It looks like that ADF detects an invalid character, but the same content is what I receive through Postman. How can I fix this "invalid character" error message?

  • What configuration should I use for ADK to get the next page and show the data?

[1]

https://developer.okta.com/docs/reference/api/users/#list-users

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} vote

1 answer

Sort by: Most helpful
  1. QuantumCache 20,676 Reputation points Moderator
    2024-01-31T22:08:41.6566667+00:00

    @Aleix Looks like we need more information from your side to help troubleshoot your case!

    • Please provide a sample of Response JSON, how does it look like?
    • Please provide screenshot of the Dataflow "Data Preview" , we want to see how is the data preview?
    • Please add screenshots of the postman when you want to compare the scenarios!!!

    Could you please confirm if the same Okta API is working from Postman? If the same API is working outside of ADF, then there should not be an issue from ADF side. I did check ADF pagination, and it is working as expected with pagination. I will check back on this, please stay tuned! When tested the 2 Links in the Response Header...! I see that only one Link is read in the Response Header. It may be too soon for me to comment that ADF can read multiple links in Response, So let me check further on this. User's image

    User's image

    If the Response Header is returning the 2 Links with unique name, then I can see the ADF capture itUser's image

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.