Skip to main content
Version: v6.5.0

Obtain information of designated employees

Command Description

Based on the employee ID, obtain detailed information about the employee (requiring relatively high permissions) and return it in the form of a dictionary

Command Prototype

UserInfo = WxWork.GetUserInfo(wxwork_obj, user_id)

Command parameter

parametermandatorytypedefault valueInstructions
wxwork_objTrueexpressionWxWorkObjectEnterprise WeChat object created using the WxWork. Create command
user_idTruestring""The specified employee ID. This can be obtained through the 'user id' field of each element returned by WxWork. GetUserList

Return result

Return_array, Assign the result of running the command to this variable.

Run instance

/********************************* Get Specified Employee Information ***********************************
Command Prototype:
UserInfo = WxWork.GetUserInfo(wxwork_obj, user_id)
Input Parameters:
wxwork_obj -- WeChat Work object. Note: WeChat Work object created using the WxWork.Create command.
user_id -- Employee ID. Note: Specified employee ID. Can be obtained from the 'userid' field of each element returned by WxWork.GetUserList.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
UserInfo = WxWork.GetUserInfo(WxWorkObject, "")
TracePrint(return_array)