There is absolutely no relationship between these objects "out of the box". Windows 8 / Windows Server 2012 introduced a concept of a "primary computer" Active Directory schema attribute but I highly doubt you're going to find that being used.
Getting the logged-on user on a remote machine is one of those things that sounds like it should be really easy but, in practice, isn't.
I think you're going to have to get some cooperation from your network administration staff to reliably get what you're looking for. Remotely querying logged-on user information through "normal means" (psloggedon
, WMI queries, remote registry access) is going to require that you either have local Administrator rights on the remote machine, or that changes are made to defaults to grant your non-Administrator context that right.
To get into talking about "hacks": I could imagine a scenario where your exception handler attempts to redirect the user's browser to a page that requires NTLM authentication and, if the clients are configured to automatically attempt authentication with the logged-on user's credential, you could "harvest" the credential that way. I could also see how that could be badly misinterpreted by the network administration staff as being an attack on users, so I'd strongly recommend against doing that.
Presumably you're administering a webapp but not part of the network administration staff. If you could get network administration to buy into joining your web server to the domain you could enable authentication, at which point you'd know the username of the remote user and wouldn't have to muck about with any of this IP address stuff. If your clients are properly configured that authentication can happen transparently, too.