1 answer
I don't think so you can able to do it with trigger directly. But what I am suggesting is try to use Apex Transaction Security Policies on the session and use the logic there.Refer this link https://help.salesforce.com/articleView?id=security_transactions_apex_policies.htm&type=0