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 = DingTalk.GetUserInfo(DingTalk_obj, user_id)

Command parameter

parametermandatorytypedefault valueInstructions
DingTalk_objTrueexpressionDingTalkObjectThe DingTalk object created using the DingTalk. Create command
user_idTruestring""The specified employee ID. can be obtained through the 'user id' field of each element returned by DingTalk.GetUserList, or through the elements returned by DingTalk.FindUser

Return result

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

Run instance

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