GetUserInfoFromUniqueID2

Returns user information such as the username, first name, and last name, given the user's external authentication token and security identifier.

Syntax

<HsvSecurityAccess>.GetUserInfoFromUniqueID2 bstrSSOToken, bstrUniqueUserID, pvarbstrUserName, pbastrFullUserName, pvarbstrFirstName, pvarbstrLastName, pvarbstrDesc, pvarbstrEMail
ArgumentDescription
bstrSSOTokenString (ByVal). The user's external authentication token.

Tip:

You can get the token with the HsxClient method GetLogonInfoSSO.

bstrUniqueUserIDString (ByVal). The user’s security identifier.

Tip:

You can get a security identifier with GetUserSID.

pvarbstrUserNameVariant. Returns the username.
pbastrFullUserNameVariant. Returns the user's fully qualified domain name.
pvarbstrFirstNameVariant. Returns the user's first name.
pvarbstrLastNameVariant. Returns the user's last name.
pvarbstrDescVariant. Returns the user's description.
pvarbstrEMailVariant. Returns the user's email address.

Example

The following function returns the fully qualified domain name of the connected user.

Function getFQDN() As String
Dim cSecurity As HsvSecurityAccess, sToken As String, sSId As String
Dim sDomain As String, sUsername As String, vName As Variant
Dim vFQDN As Variant, vFirst As Variant, vLast As Variant
Dim vDesc As Variant, vEmail As Variant
'g_cSession is an HsvSession object reference
Set cSecurity = g_cSession.Security
'g_cClient is an HsxClient object reference
sToken = g_cClient.GetLogonInfoSSO(sDomain, sUsername)
cSecurity.GetUserSID sUsername, sSId
cSecurity.GetUserInfoFromUniqueID2 sToken, sSId, vName, vFQDN, _
   vFirst, vLast, vDesc, vEmail
getFQDN = vFQDN
End Function