Download taking to username and password prompt when not logged into system

Hi,
We have an preauthentication mechanism to access our system. When I am in the session, I don't have problem downloading a document from a pdf link but when I am signed out, if I click link, It takes me to authentication page as expected but once I get through the third party preauthentication page, it again asks me for appian username and passpword. Could you please provide me pointers on how to resolve this issue?
Following is the issue:

{"resource":"\\/suite\\/rest\\/a\\/content\\/latest\\/ikB3RFp1kIoRabWe6PCvEyZd8MrGWK0Io4zyK3e0iUSjELftGs6Kp2XSQ\\/o","error":"APNX-1-4187-000","message":"Incorrect user name or password. Please check your credentials and try again.","title":"An Error Has Occurred"}

OriginalPostID-273475

  Discussion posts and replies are publicly visible