Forum Discussion
fabric notebook business Central API token timeout
- 1 year ago
Using a single access token for a long-running pagination process can lead to token expiration before all records are fetched, which is why you see the “Unauthorized” error and only half the expected data.
Instead of relying on a single token throughout the entire process, incorporate logic to check the token’s expiry and refresh it before it expires. This is commonly done using a refresh token or leveraging a library like MSAL which automatically handles token renewal.
Using a single access token for a long-running pagination process can lead to token expiration before all records are fetched, which is why you see the “Unauthorized” error and only half the expected data.
Instead of relying on a single token throughout the entire process, incorporate logic to check the token’s expiry and refresh it before it expires. This is commonly done using a refresh token or leveraging a library like MSAL which automatically handles token renewal.