Getting VPN user name and domain on local machine

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I VPN into a remote network from my machine, is there a way to get the
user name and domain of the user who connected through VPN from my computer?

WindowsIdentity.GetCurrent().Name
Environment.UserName
SystemInformation.UserName
Environment.GetEnvironmentVariable("USERNAME")

These all return the local user (as expected). How do I get the VPN user
who connected to the remote network?
 
Dan Suceava said:
If I VPN into a remote network from my machine, is there a way to get the
user name and domain of the user who connected through VPN from my
computer?

WindowsIdentity.GetCurrent().Name
Environment.UserName
SystemInformation.UserName
Environment.GetEnvironmentVariable("USERNAME")

These all return the local user (as expected). How do I get the VPN user
who connected to the remote network?

You would have to ask the device which the user VPN'd into. It's the only
device which would know.

Once VPN'd into the network, it's all just bits on the wire. The network
doesn't know where those bits came from.

John Saunders
 
Back
Top