Since the raw REST call works with the same token, this smells like an SDK deserialization or pagination bug rather than auth. The generic “Error calling OktaPagedCollectionEnumerator” with no inner exception is unhelpful, worth wrapping the loop in try/catch and logging the full exception including any response body. Also check the 10.x GitHub issues, there’ve been reports of the paged enumerator choking. Might be worth testing a slightly older SDK version to isolate it.
Agreed, raw REST succeeding with the same token pretty much rules out auth and points straight at the SDK layer. The paged enumerator swallowing the inner exception is the frustrating part, so logging the full exception chain (and the actual HTTP response body it choked on) is the right first move, since it’s often a single record or field that doesn’t deserialize cleanly. The version-downgrade test is a smart isolation step too. If an older SDK works, you’ve confirmed a regression and can point the maintainers at the exact range. Worth checking their GitHub issues for the enumerator specifically.