Accessing User Data (Visual Basic)


Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

This section contains topics dealing with the My.User object and tasks that you can accomplish with it.

The My.User object provides access to information about the logged-on user by returning an object that implements the IPrincipal interface.

Get the user's login nameName
Get the user's domain name, if the application uses Windows authenticationCurrentPrincipal
Determine the user's roleIsInRole