I am trying to use authorization function "accesscheck" for a user to access
the resource which is in the other domain, But accesscheck function denies
the access.

Example
Suppose there are 2 domains with trust. share object is on Domain 1 and need
to access this object from Domain 2. When the user from any Domain having
access rights to share oject login to Domain2 then he gets the access token
from domain2. We use function AccessCheck(which check access) functions which
denies the access and in my knowledge it does not work across domain. Which
function should I use to fix this problem.