NetUserGetInfo or Net32UserGetInfo

The NetUserGetInfo API retrieves information about a particular account on a server. This includes information about the user's privileges, the home directory, and the status of an account.

To retrieve a user's comment or full name for a user ID, direct a NetUserGetInfo call to any server in the domain.