Skip to main content

i4scada Knowledge Base

WCF User Service Documentation

Abstract

The User Service handles all the User related operations. This article describes all the available methods.

This WCF web service handles all the User related operations. The following methods are available:

GetCurrentUserDetails

Syntax

GetCurrentUserDetails(string sessionId, string clientId);

Description

Retrieves all available details about the currently logged in user

Parameters

  • sessionId (string) - the WEBfactory session id, obtained from a call to ISignalsService.Connect()

  • clientId (string) - the id of the client

Return Value

The UserDetailsDTO object, containing:

  • Name (string) - the username of the user

  • FirstName (string) - the first name of the user

  • LastName (string) - the last name of the user

  • Plant (string) - the plant to which the user is assigned

  • RFIDSerialNo (string) - the RFID serial number associated with the user

  • Company (string) - the company to which the user is assigned

  • Description (string) - the description of the user

GetAllUsers

This method follows the WEBfactory i4scada Security Protocol.

Syntax

GetAllUsers(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the users

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

GetAllUsersByToken

Syntax

GetAllUsersByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the users using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

GetAllUserDetails

This method follows the WEBfactory i4scada Security Protocol.

Syntax

GetAllUsers(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the user details for all existing users

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUserDetailsByToken

Syntax

GetAllUserDetailsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the user details for all existing users, using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUsersWithSameAuthorizationGroups

This method follows the WEBfactory i4scada Security Protocols.

Syntax

GetAllUsersWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the users which have the same authorization groups

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

GetAllUsersWithSameAuthorizationGroupsByToken

Syntax

GetAllUsersWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the users that have the same authorization groups using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

GetAllUserDetailsWithSameAuthorizationGroups

This method follows the WEBfactory i4scada Security Protocol.

Syntax

GetAllUserDetailsWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the user details for all users that have the same authorization groups

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUserDetailsWithSameAuthorizationGroupsByToken

Syntax

GetAllUserDetailsWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the user details for all users that have the same authorization groups, using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

InsertUser

This method follows the WEBfactory Security Protocols.

Syntax

InsertUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut);

Description

Adds a new user based on the provided model

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

InsertUserByToken

Syntax

InsertUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut);

Description

Adds a new user based on the provided model and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

UpdateUser

This method follows the WEBfactory i4scada Security Protocols.

Syntax

UpdateUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut);

Description

Updates an existing user based on the provided model

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

UpdateUserByToken

Syntax

UpdateUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut);

Description

Updates an existing user based on the provided model and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

DeleteUser

This method follows the WEBfactory i4scada Security Protocol.

Syntax

DeleteUser(string sessionId, string clientId, string userName, bool isDomainUser, Guid id, int millisecondsTimeOut);

Description

Deletes an existing user based on the provided ID

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • id (guid) - the unique ID of the user for which the operation is applied

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

DeleteUserByToken

Syntax

DeleteUserByToken(string securityToken, Guid id, int millisecondsTimeOut);

Description

Deletes an existing user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • id (guid) - the unique ID of the user for which the operation is applied

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeUserPassword

This method follows the WEBfactory i4scada Security Protocol.

Syntax

ChangeUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, Guid affectedUserId, string newPassword, int millisecondsTimeOut);

Description

Changes the password of an existing user based on the provided ID

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • affectedUserId (guid) - the unique ID of the user for which the operation is applied

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeUserPasswordByToken

Syntax

ChangeUserPasswordByToken(string securityToken, Guid affectedUserId, string newPassword, int millisecondsTimeOut);

Description

hanges the password of an existing user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • affectedUserId (guid) - the unique ID of the user for which the operation is applied

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeCurrentUserPassword

This method follows the WEBfactory i4scada Security Protocol.

Syntax

ChangeCurrentUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, string currentPassword, string newPassword, int millisecondsTimeOut);

Description

Changes the password of the currently logged in user based on the provided parameters

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the defined user in context of which the method is called

  • isDomainUser (bool) - true if the defined user is an Active Directory user

  • currentPassword (guid) - the old password that will be changed

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeCurrentUserPasswordByToken

Syntax

ChangeCurrentUserPasswordByToken(string securityToken, string currentPassword, string newPassword, int millisecondsTimeOut);

Description

Changes the password of the currently logged in user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • currentPassword (guid) - the old password that will be changed

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error