I am attaching here what I did to resolve this issue. This resolution uses Ellucian Ethos as the example and certain items (headers, etc) may exist differently for your API but you can at least see how to pull down a auth token, attach to a get call, pagination, file writes and clean ups. I added a part about alternate thoughts which I will probably implement here as we begin to build out a large data lakehouse.224484-copy-and-page-through-large-endpoint-in-azure-data.pdf
ADF - Copy Data activity from REST to ADLS. API authorization token expires - Reauthenticate during long pagination
Using ADF I am seeking help to see if there is a way to reauthenticate a REST API after the token has expired during copy data step in the pipeline. Pagination is working as expected but once token expires (5 minutes) the call fails. There is no way to extend the token timeout time at the API service so I need to be able to run a POST request again (first step in pipeline) and use dynamic content to add the bearer token response in the header until the entire endpoint has been read.
Thoughts: API endpoint always responds with a status 401 when token has expired, can I trigger an event on that failure and continue in the process? Other ideas are updating token every 4 minutes but I have not determined a good way to do that either.
This person seems to have the same question but no valid response received. https://stackoverflow.com/questions/70862283/adf-manage-token-expiration-in-copy-data-activity