NetUserGetLogonAsn or Net32UserGetLogonAsn

The NetUserGetLogonAsn API retrieves information about logon assignments for a user.