Do you use Shibboleth authentication? This sounds like a CASScope issue.
In terms of debugging - you’re web client is your best bet for this situation - it’ll tell you what’s going on - where you’re being redirected to (if it’s the right location with the right credentials and so on).