2.5 User and Group Management

2.5.1 Data Structures

2.5.1.1 FTHUserData

FTHUserData

Holds the data from user object

Data Type

Field Name

Description

int

UserID

User ID in Thru

string

Name

User name in Thru, used for sign-in

string

DomainUsername

Username in the LAN Windows domain in the format domain\username

bool

DomainUserFlag

True if user is a domain user created by some Sync server

string

FirstName

User first name

string

LastName

User last name

string

Email

User email

int

Role

User role in Thru: Administrator/Manager/Member

bool

Active

Is user active

bool

Deleted

Is user deleted

string

UserSyncID

Sync ID that is created by synchronization services such as Active Directory integration/SSO Thru product.

string

FullName

Full user name, a string that contains both first and last name

string

SortableName

Name to be used in sorting

int

HomeFolderID

ID of the home folder

2.5.1.2 FTHUserGroupData

FTHUserGroupData

Holds the data from User Group object

Data Type

Field Name

Description

int

UserGroupID

User Group ID in Thru

string

Name

Group name in Thru

2.5.2 Methods

2.5.2.1 CreateDomainUser

CreateDomainUser
Creates user on request from services that synchronize user list in corporate Active Directory with Thru user list.

FTHUserData
CreateDomainUser (Guid sessionID, string domainUsername, string userSyncID, string firstName, string lastName, string email, bool createHomeFolder, int role, bool active )

Parameter Name

Description

sessionID

User session returned by one of the Open functions

domainUsername

Username in the LAN Windows domain in the format “domain\username”

userSyncID

Unique synchronization ID provided by external sync service, in case of Thru SSO service synching with Active Directory it is equal to user GUID from Active Directory.

firstName

user first name in corporate directory

lastName

User last name in corporate directory

email

User email in corporate directory. Mandatory parameter. This call will fail if email is not provided

createHomeFolder

Flag to create home folder, home folder name is derivative from user email address. ‘@’ sign is replaced by a dot

role

User role in Thru, allowed values:
Member = 3
Manager = 4
Administrator = 5

active

Flag: if the user should be created active

2.5.2.2 GetUserByUserSyncID

GetUserByUserSyncID
Get user by a user SyncID, used by external synchronization service like Thru integration with Active Directory/SSO service.

FTHUserData
GetUserByUserSyncID (Guid sessionID, string userSyncID)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

userSyncID

Unique synchronization ID provided by external sync service, in case of Thru SSO service synching with Active Directory it is equal to user GUID from Active Directory.

2.5.2.3 CreateUser

CreateUser
Create a user in a Thru site.

FTHUserData
CreateUser (Guid sessionID, string name, string firstName, string lastName, string email, bool createHomeFolder, int role, bool active, string homeFolderName )

Parameter Name

Description

sessionID

User session returned by one of the Open functions

name

User login name

firstName

User first name in corporate directory

lastName

User last name in corporate directory

email

User email in corporate directory

createHomeFolder

Flag to create home folder

role

User role in Thru

active

Flag: if the user should be created active

homeFolderName

Name for the home folder

2.5.2.4 CreateUserEx

CreateUserEx
Create a user in a Thru site.

FTHUserData
CreateUserEx (Guid sessionID, string name, string firstName, string lastName, string email, bool createHomeFolder, int role, bool active, string homeFolderName, string password )

Parameter Name

Description

sessionID

User session returned by one of the Open functions

name

User login name

firstName

User first name in corporate directory

lastName

User last name in corporate directory

email

User email in corporate directory

createHomeFolder

Flag to create home folder

role

User role in Thru

active

Flag: if the user should be created active

homeFolderName

Name for the home folder

Password

User password

2.5.2.5 CreateUserEx2

CreateUserEx2
Create a user in a Thru site. Allows the assigning the user to a ‘LOGIN RESTRICTED’ group.

FTHUserData
CreateUserEx2 (Guid sessionID, string name, string firstName, string lastName, string email, bool createHomeFolder, int role, bool active, string homeFolderName, string password, bool noLogin)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

name

User login name

firstName

User first name in corporate directory

lastName

User last name in corporate directory

email

User email in corporate directory

createHomeFolder

Flag to create home folder

role

User role in Thru

active

Flag: if the user should be created active

homeFolderName

Name for the home folder

password

User password

noLogin

Flag to assign the user to a ‘LOGIN RESTRICTED’ group

2.5.26 DeleteUser

DeleteUser
Deletes a user in Thru site by a user ID

void
DeleteUser (Guid sessionID, int userID)

Parameter Name

Description

SessionID

User session returned by one of the Open functions

UserID

Thru user ID of the user to delete

2.5.2.7 FindUsers

FindUsers
Find users by search criteria

FTHUserData[]
FindUsers (Guid sessionID, string emailSearch, bool emailAll, string nameSearch, bool nameAll, string fullNameSearch, bool fullNameAll, string companyNameSearch, bool companyNameAll, bool includeDeleted)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

emailSearch

Search pattern for emails

emailAll

Flag to include all emails

nameSearch

Search pattern for user name

nameAll

Flag to include all user names

fullNameSearch

Search pattern for full name

fullNameAll

Flag to include all full names

companyNameSearch

Search pattern for company name

companyNameAll

Flag to include all company names

includeDeleted

Include deleted users into search results

2.5.2.8 GetUser
GetUser
Get user by a user ID

FTHUserData
GetUser (Guid sessionID, int userID)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

userID

Thru user ID of the user to retrieve

2.5.2.9 GetUserGroup

GetUserGroup
Get user group data by a group ID, see data structure description

FTHUserGroupData
GetUserGroup(Guid sessionID, int userGroupID)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

userGroupID

ID of the user group to retrieve

2.5..2.10 SaveUser

SaveUser
Save user object data to Thru server

FTHUserData
SaveUser(Guid sessionID, FTHUserData user)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

user

User data that should be saved, see data structure description

2.5.2.11 UndeleteUser

UndeleteUser
Undelete user is used in order to undelete previously deleted user instead of creating a new user with the same name and therefore preserve audit information. Previously existing home folder cannot be found since it has been unlinked, new home folder can be created.

FTHUserData
UndeleteUser (Guid sessionID, int userID, bool createHomeFolder, string homeFolderName)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

userID

User ID of the user to be undeleted

createHomeFolder

Flag that defines if home folder should be created

homeFolderName

Name for the home folder if flag requires home folder creation

2.5.2.12 ChangeUserPassword

ChangeUserPassword
Change password for a user with the known session

void
ChangeUserPassword(Guid sessionID, int userID, string oldPassword, string newPassword)

Parameter Name

Description

sessionID

User session returned by one of the Open functions

userID

User ID of the user for who the password will be changed

oldPassword

Old password

newPassword

New password