Error 401 is for invalid authorization.
But in case of preview am getting unauthorized error.
are you doing any transaction here? OR just reading the content?
If connection profile is connected successfully with a user details, doesnt mean he has all kind of authorization for transactions. Connection profile is just to make a connectivity between systems.
Please cross check if user (in connection profile) has valid authorization?
you can share some screenshots where you are getting this error