Class UserAgent
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class UserAgent : IUserAgent, IAgent
Constructors
UserAgent(IAccessGatewayInfoImplementation, ICredentialImplementation, IRoleImplementation, IRoleEntityImplementation, IServiceAuthImplementation, ITokenManagementInfoImplementation, IUntrustedCredentialsImplementation, IUserImplementation, IUserGroupImplementation, IUserGroupListImplementation, IUserInfoImplementation, IUserInfoListImplementation, ISoRequestItemsAccessor)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public UserAgent(IAccessGatewayInfoImplementation accessGatewayInfoImplementation, ICredentialImplementation credentialImplementation, IRoleImplementation roleImplementation, IRoleEntityImplementation roleEntityImplementation, IServiceAuthImplementation serviceAuthImplementation, ITokenManagementInfoImplementation tokenManagementInfoImplementation, IUntrustedCredentialsImplementation untrustedCredentialsImplementation, IUserImplementation userImplementation, IUserGroupImplementation userGroupImplementation, IUserGroupListImplementation userGroupListImplementation, IUserInfoImplementation userInfoImplementation, IUserInfoListImplementation userInfoListImplementation, ISoRequestItemsAccessor accessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IAccessGatewayInfoImplementation | accessGatewayInfoImplementation | |
| ICredentialImplementation | credentialImplementation | |
| IRoleImplementation | roleImplementation | |
| IRoleEntityImplementation | roleEntityImplementation | |
| IServiceAuthImplementation | serviceAuthImplementation | |
| ITokenManagementInfoImplementation | tokenManagementInfoImplementation | |
| IUntrustedCredentialsImplementation | untrustedCredentialsImplementation | |
| IUserImplementation | userImplementation | |
| IUserGroupImplementation | userGroupImplementation | |
| IUserGroupListImplementation | userGroupListImplementation | |
| IUserInfoImplementation | userInfoImplementation | |
| IUserInfoListImplementation | userInfoListImplementation | |
| ISoRequestItemsAccessor | accessor |
UserAgent(IAccessGatewayInfoImplementation, ICredentialImplementation, IRoleImplementation, IRoleEntityImplementation, IServiceAuthImplementation, ITokenManagementInfoImplementation, IUntrustedCredentialsImplementation, IUserImplementation, IUserGroupImplementation, IUserGroupListImplementation, IUserInfoImplementation, IUserInfoListImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public UserAgent(IAccessGatewayInfoImplementation accessGatewayInfoImplementation, ICredentialImplementation credentialImplementation, IRoleImplementation roleImplementation, IRoleEntityImplementation roleEntityImplementation, IServiceAuthImplementation serviceAuthImplementation, ITokenManagementInfoImplementation tokenManagementInfoImplementation, IUntrustedCredentialsImplementation untrustedCredentialsImplementation, IUserImplementation userImplementation, IUserGroupImplementation userGroupImplementation, IUserGroupListImplementation userGroupListImplementation, IUserInfoImplementation userInfoImplementation, IUserInfoListImplementation userInfoListImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| IAccessGatewayInfoImplementation | accessGatewayInfoImplementation | |
| ICredentialImplementation | credentialImplementation | |
| IRoleImplementation | roleImplementation | |
| IRoleEntityImplementation | roleEntityImplementation | |
| IServiceAuthImplementation | serviceAuthImplementation | |
| ITokenManagementInfoImplementation | tokenManagementInfoImplementation | |
| IUntrustedCredentialsImplementation | untrustedCredentialsImplementation | |
| IUserImplementation | userImplementation | |
| IUserGroupImplementation | userGroupImplementation | |
| IUserGroupListImplementation | userGroupListImplementation | |
| IUserInfoImplementation | userInfoImplementation | |
| IUserInfoListImplementation | userInfoListImplementation | |
| ISoRequestItemsAccessor | accessor | |
| IDebugUser | debugUser | |
| IServiceCallsRepository | serviceCallsRepository | |
| IScriptingConfiguration | scriptingConfiguration | |
| IOnlineConfiguration | onlineConfiguration |
Methods
AddOwnerContactAsync(int, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task AddOwnerContactAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | Id of the contact to add as a owner contact |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
CanChangePasswordAsync(int, CancellationToken)
Check if the current assoicate can change the password for an associate
Declaration
public Task<bool> CanChangePasswordAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of the user to check if password can be changed |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the associate can change the password |
ChangeOwnPasswordAsync(string, string, CancellationToken)
Change password for a user.
Declaration
public Task<bool> ChangeOwnPasswordAsync(string oldPassword, string newPassword, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldPassword | The current password of the user. Administrators can leave this blank to force a new password upon a user. |
| string | newPassword | The new password for the user |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the password was successfully changed. |
ChangePasswordAsync(int, string, string, CancellationToken)
Change password for a user.
Declaration
public Task<bool> ChangePasswordAsync(int associateId, string oldPassword, string newPassword, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of the user to change password for. |
| string | oldPassword | The current password of the user. Administrators can leave this blank to force a new password upon a user. |
| string | newPassword | The new password for the user |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the password was successfully changed. |
ChangePasswordFromNameAsync(string, string, string, CancellationToken)
Change password for a user.
Declaration
public Task<bool> ChangePasswordFromNameAsync(string associateName, string oldPassword, string newPassword, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | associateName | Username of the user to change password for. |
| string | oldPassword | The current password of the user. Administrators can leave this blank to force a new password upon a user. |
| string | newPassword | The new password for the user |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the password was successfully changed. |
ChangeUserTypeAsync(User, UserType, CancellationToken)
Get a user from the user name.
Declaration
public Task<User> ChangeUserTypeAsync(User user, UserType userType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | User name of the user to get. |
| UserType | userType | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | User retrieved by name |
CheckAccessGatewayRegistrationAsync(CancellationToken)
Checks if AccessGatewayRegistration is valid
Declaration
public Task<bool> CheckAccessGatewayRegistrationAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the registration is usable |
CreateDefaultRoleEntityAsync(CancellationToken)
Loading default values into a new RoleEntity.
Declaration
public Task<RoleEntity> CreateDefaultRoleEntityAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<RoleEntity> | New RoleEntity with default values |
CreateDefaultRoleEntityFromTypeAsync(RoleType, CancellationToken)
Create a new role entity of the specified role type. The role type cannot be changed after the entity is created.
Declaration
public Task<RoleEntity> CreateDefaultRoleEntityFromTypeAsync(RoleType type, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| RoleType | type | Type of role (Employee/External/Anonymous/System) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<RoleEntity> | A blank role. |
CreateDefaultServiceAuthAsync(CancellationToken)
Loading default values into a new ServiceAuth.
Declaration
public Task<ServiceAuth> CreateDefaultServiceAuthAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ServiceAuth> | New ServiceAuth with default values |
CreateDefaultUntrustedCredentialsAsync(CancellationToken)
Loading default values into a new UntrustedCredentials.
Declaration
public Task<UntrustedCredentials> CreateDefaultUntrustedCredentialsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UntrustedCredentials> | New UntrustedCredentials with default values |
CreateDefaultUserAsync(CancellationToken)
Loading default values into a new User.
Declaration
public Task<User> CreateDefaultUserAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | New User with default values |
CreateDefaultUserFromUserTypeAndCredentialAsync(UserType, int, string, string, string, CancellationToken)
Creates a PersonEntity with default values based on the contactId and credentials.
Declaration
public Task<User> CreateDefaultUserFromUserTypeAndCredentialAsync(UserType userType, int contactId, string credentialType, string credentialValue, string credentialDisplayValue, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | Type of associate for the user |
| int | contactId | Contact id of the person |
| string | credentialType | Type of credentials, corresponding to name of plugin and type in the credentials table. |
| string | credentialValue | This is the actuall value of the credentials. This will typically be the password or teh users SID in active directory |
| string | credentialDisplayValue | The value displayed to the user. this will typically be the users login name in active directory. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> |
CreateDefaultUserFromUserTypeAndPersonIdAsync(UserType, int, CancellationToken)
Create default User providing the associate type and person id. System and Anonymous users can be created without an exsisting person and permits person id to be 0.
Declaration
public Task<User> CreateDefaultUserFromUserTypeAndPersonIdAsync(UserType userType, int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | Type of associate for the user |
| int | personId | Primary key of the person to become a user. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | New user object with defalt values set. |
CreateDefaultUserFromUserTypeAsync(UserType, CancellationToken)
Create default User providing the user type. Only System and Anonymous users can be created without an exsisting person. Use CreateDefaultUserFromUserTypeAndPersonId to create internal (i.e. Employee) or external users.
Declaration
public Task<User> CreateDefaultUserFromUserTypeAsync(UserType userType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | Type of associate for the user. This can only be System or Anonymous. Use CreateDefaultUserFromUserTypeAndPersonId to create internal (i.e. Employee) or external users. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | New user object with defalt values set. |
CreateExternalUserAsync(int, string, string, int, bool, CancellationToken)
Creates an associate of type external user.
Declaration
public Task<int> CreateExternalUserAsync(int personId, string userName, string password, int roleId, bool isActive, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The personId to create an external user for. |
| string | userName | Login username. |
| string | password | Login password. |
| int | roleId | Id of role for the external user. The role must be a role of type external users. |
| bool | isActive | Set isActive to true to enable the external user to log in. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int> | Returns the created associateId. |
CreateUserGroupAsync(CancellationToken)
Create UserGroup (Rank is assigned to the highest rank)
Declaration
public Task<UserGroup> CreateUserGroupAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserGroup> |
DecryptAndSaveExternalTokensAsync(TokenManagementInfo, CancellationToken)
First asks AccessGateway to decrypt the tokens, then saves the external tokens to the DB and returns a key that can be used to retrieve them
Declaration
public Task<string> DecryptAndSaveExternalTokensAsync(TokenManagementInfo tokenManagementInfo, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenManagementInfo | tokenManagementInfo | Token information. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> | Key that can be used to retrieve the tokens |
DeleteCredentialAsync(int, string, CancellationToken)
Remove credential of a specific type for a user
Declaration
public Task<bool> DeleteCredentialAsync(int userId, string credentialType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userId | Primary key of the user (i.e. associate) |
| string | credentialType | Type of credentials, corresponding to name of plugin and type in the credentials table |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if credential was sucessfully removed. |
DeleteExternalUserAsync(int, CancellationToken)
Deletes an associate of type external user.
Declaration
public Task DeleteExternalUserAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | The associateId to delete the associate entry for. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
DeleteRoleAsync(int, int, CancellationToken)
Delete the specified role and move all users associated with the role to the replacingRoleId
Declaration
public Task DeleteRoleAsync(int roleIdToDelete, int replacingRoleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleIdToDelete | The roleId to delete |
| int | replacingRoleId | The roleId which all associated users will be moved to. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
DeleteServiceAuthAsync(int, CancellationToken)
Deletes the ServiceAuth
Declaration
public Task DeleteServiceAuthAsync(int serviceAuthId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | serviceAuthId | The identity of the ServiceAuth |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteUserAsync(int, CancellationToken)
Deletes the User
Declaration
public Task DeleteUserAsync(int userId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userId | The identity of the User |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteUserFromNameAsync(string, CancellationToken)
Delete a user, with lookup based on the user name.
Declaration
public Task DeleteUserFromNameAsync(string userName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | User name of the user to delete. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task | This method has no return value |
DeleteUserGroupAsync(int, int, CancellationToken)
Delete a usergroup and move its members to another usergroup
Declaration
public Task DeleteUserGroupAsync(int userGroupToDelete, int userGroupToMoveTo, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userGroupToDelete | The id of the userGroup to delete |
| int | userGroupToMoveTo | The id of the userGroup to move the members to |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
ExecuteUserCommandAsync(string, CommandActionResult, User, CancellationToken)
Executes the custom command for User
Declaration
public Task<CommandResult> ExecuteUserCommandAsync(string commandName, CommandActionResult actionResult, User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | commandName | The name of the command to execute. |
| CommandActionResult | actionResult | Result of an UI operation. |
| User | user | The User to execute commands on. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CommandResult> | Result of the executed command |
FindCredentialUsersAsync(string, string, CancellationToken)
Find users matching the partial name.
Declaration
public Task<CredentialsGroupUsers> FindCredentialUsersAsync(string type, string searchString, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credentials, corresponding to name of plugin and type in the credentials table. |
| string | searchString | Partly name of the user group |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CredentialsGroupUsers> |
FindCredentialsGroupsAsync(string, string, CancellationToken)
Get user groups holding users filtered by the searchString. This method is only relevant if the CredentialType control is of type link. There will allways be at least one groups even if the underlying provider does not support groups.
Declaration
public Task<CredentialsGroup[]> FindCredentialsGroupsAsync(string type, string searchString, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credentials, corresponding to name of plugin and type in the credentials table. |
| string | searchString | Partly name of domain group. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CredentialsGroup[]> |
FindRolesWithFunctionalRightAsync(string, CancellationToken)
Find all roles with a given functional right. The roles matched must contain the specified functional right.
Declaration
public Task<MDOListItem[]> FindRolesWithFunctionalRightAsync(string functionalRightName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | functionalRightName | Functional right name to search for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<MDOListItem[]> | Roles that contains the given functional right |
FindRolesWithFunctionalRightsAsync(string[], CancellationToken)
Find all roles with a given set of functional rights. The roles matched must contain one or more of the specified functional rights.
Declaration
public Task<int[]> FindRolesWithFunctionalRightsAsync(string[] functionalRightNames, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | functionalRightNames | An array of functional rights names to search for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int[]> | Role ids that contains your functional rights |
FindRolesWithoutFunctionalRightsAsync(string[], CancellationToken)
Find all roles without a given set of functional rights. The roles matched must not contain any of the specified functional rights.
Declaration
public Task<int[]> FindRolesWithoutFunctionalRightsAsync(string[] functionalRightNames, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | functionalRightNames | An array of functional rights names to search for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<int[]> | Role ids that without your functional rights |
GenerateNewPasswordForExternalUserAsync(string, CancellationToken)
Generates a new password for an external user.
Declaration
public Task<string> GenerateNewPasswordForExternalUserAsync(string associateName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | associateName | The name of the associate to change the password for. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> | Returns the generated password. |
GetAccessGatewayInfoAsync(CancellationToken)
Returns accessgateway registration info
Declaration
public Task<AccessGatewayInfo> GetAccessGatewayInfoAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<AccessGatewayInfo> |
GetAccessTokenAsync(string, bool, CancellationToken)
Get an access token based on the current user's session.
Declaration
public Task<string> GetAccessTokenAsync(string appToken, bool includeCsSession, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | appToken | |
| bool | includeCsSession | Initialize CS session for this access token?. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> | An access token. "8A:xyz123==" |
GetAllDataRightsAsync(int, RoleRelationToOwner, CancellationToken)
Get a list of all data rights for the given role, filtered by relation to owner. MDO List name = 'DataRights', extra='roleType=0'.
Declaration
public Task<StringDictionary> GetAllDataRightsAsync(int roleId, RoleRelationToOwner relationToOwner, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to set the functional rights for |
| RoleRelationToOwner | relationToOwner | The id of the relation to owner |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StringDictionary> | The CRUD rights (C, CR, CRU, or CRUD) for each table related to the given role and relation to owner. |
GetAllFunctionalRightsAsync(RoleType, CancellationToken)
Get a list of all functional rights for the given type of role. MDO List name = 'FunctionRights', extra='roleType=0'
Declaration
public Task<SelectableMDOListItem[]> GetAllFunctionalRightsAsync(RoleType roleType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| RoleType | roleType | Type of role (Employee/External/Anonymous/System) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SelectableMDOListItem[]> | FunctionRight items with name and description. Code name for function right is in the extra-info property. |
GetAllRolesAsync(RoleType, CancellationToken)
Get a list of all roles for the given type of role. MDO List name = 'Roles', extra='0' (roleType)
Declaration
public Task<SelectableMDOListItem[]> GetAllRolesAsync(RoleType roleType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| RoleType | roleType | Type of role (Employee/External/Anonymous/System) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SelectableMDOListItem[]> | FunctionRight items with name and description. Code name for function right is in the extra-info property. |
GetAllUserGroupsAsync(bool, CancellationToken)
Get all user groups
Declaration
public Task<UserGroup[]> GetAllUserGroupsAsync(bool includeDeleted, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeDeleted | Include user groups with Deleted set to true |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserGroup[]> | All user groups |
GetCredentialTypesAsync(CancellationToken)
Get available credential types that can be used for authentication
Declaration
public Task<CredentialType[]> GetCredentialTypesAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CredentialType[]> | Credential types that can be used for authentication |
GetCredentialTypesForUserTypeAsync(UserType, CancellationToken)
Get available credential types that can be used for the specified user type.
Declaration
public Task<CredentialType[]> GetCredentialTypesForUserTypeAsync(UserType userType, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | The user type to retrieve credential types for |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CredentialType[]> | Credential types that can be used for authentication |
GetCredentialUsersInGroupAsync(string, string, CancellationToken)
Get credential users within a user group
Declaration
public Task<CredentialsGroupUsers> GetCredentialUsersInGroupAsync(string type, string groupName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credentials, corresponding to name of plugin and type in the credentials table. |
| string | groupName | Name of user group needed to discover the users. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CredentialsGroupUsers> |
GetDataRightAsync(int, string, RoleRelationToOwner, CancellationToken)
Read one specific data right at the given position. An exception will be thrown if non existing position is specified.
Declaration
public Task<string> GetDataRightAsync(int roleId, string tableName, RoleRelationToOwner relationToOwner, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to set the data right for |
| string | tableName | The name of the entity/table |
| RoleRelationToOwner | relationToOwner | The id of the relation to owner |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> | The data right value at the specified position (C, CR, CRU, or CRUD) |
GetDataRightsAsync(int, string, CancellationToken)
Read specific a set of data rights at the given row in the rights matrix. An exception will be thrown if non existing position is specified.
Declaration
public Task<StringDictionary> GetDataRightsAsync(int roleId, string tableName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to set the data right for |
| string | tableName | The name of the entity/table |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StringDictionary> | The data right values for all the defined relationships (C, CR, CRU, or CRUD) |
GetDefaultAssociateUserNameAsync(User, CancellationToken)
Get the default username for a person
Declaration
public Task<string> GetDefaultAssociateUserNameAsync(User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> |
GetExternalTokensAsync(string, CancellationToken)
Retrieve the tokens from the DB based on the given key
Declaration
public Task<TokenManagementInfo> GetExternalTokensAsync(string key, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | Token retrievel key |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<TokenManagementInfo> | Key to retrieve tokens |
GetFunctionalRightsAsync(int, CancellationToken)
Get all functional rights for the given role. Functional rights not set on the role are not included. MDO List name = 'FunctionRights', extra='role=123'
Declaration
public Task<SelectableMDOListItem[]> GetFunctionalRightsAsync(int roleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to get the functional rights for. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<SelectableMDOListItem[]> | FunctionRight items with name and description. Code name for function right is in the extra-info property. |
GetOrRegisterAccessGatewayInfoAsync(string, CancellationToken)
Returns accessgateway registration info and registers a new or adds the url if necessary
Declaration
public Task<AccessGatewayInfo> GetOrRegisterAccessGatewayInfoAsync(string redirectUri, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | redirectUri | This is the registered redirect_uri for AccessGateway OIDC. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<AccessGatewayInfo> |
GetRoleAsync(int, CancellationToken)
Gets a Role object.
Declaration
public Task<Role> GetRoleAsync(int roleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The identifier of the Role object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<Role> | A single Role |
GetRoleEntityAsync(int, CancellationToken)
Gets a RoleEntity object.
Declaration
public Task<RoleEntity> GetRoleEntityAsync(int roleEntityId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleEntityId | The identifier of the RoleEntity object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<RoleEntity> | A single RoleEntity |
GetServiceAuthAsync(int, CancellationToken)
Gets a ServiceAuth object.
Declaration
public Task<ServiceAuth> GetServiceAuthAsync(int serviceAuthId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | serviceAuthId | The identifier of the ServiceAuth object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ServiceAuth> | A single ServiceAuth |
GetSupportedChangePasswordTypesAsync(int, CancellationToken)
Get the different methods the user can use to change password
Declaration
public Task<ChangePasswordType[]> GetSupportedChangePasswordTypesAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of the user to check if password can be changed |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ChangePasswordType[]> | List of types - empty if the user cannot change password in any way |
GetUntrustedCredentialsAsync(string, CancellationToken)
Get a set of credentials of a specified type for authenticated user.
Declaration
public Task<UntrustedCredentials[]> GetUntrustedCredentialsAsync(string type, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credential(Ex: "imap", "smtp"). |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UntrustedCredentials[]> | Array of credentials of the specified type. |
GetUntrustedCredentialsForAssociateAsync(int, string, CancellationToken)
Get a set of credentials of a specified type for a specified user. SecretValue is only populated for authenticated user, and system users.
Declaration
public Task<UntrustedCredentials[]> GetUntrustedCredentialsForAssociateAsync(int associateId, string type, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Id of user to retrieve credentials for. |
| string | type | Type of credential(Ex: "imap", "smtp"). |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UntrustedCredentials[]> | Array of credentials of the specified type. |
GetUserAsync(int, CancellationToken)
Gets a User object.
Declaration
public Task<User> GetUserAsync(int userId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userId | The identifier of the User object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | A single User |
GetUserCommandsAsync(User, CancellationToken)
Get registered custom commands for User
Declaration
public Task<CustomCommand[]> GetUserCommandsAsync(User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | The User |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<CustomCommand[]> | Custom commands for the User |
GetUserFromEjUserIdAsync(int, CancellationToken)
Get user from ejUserId - used for eJournal Legacy Support.
Declaration
public Task<User[]> GetUserFromEjUserIdAsync(int ejUserId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | ejUserId | ejUserId - |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User[]> |
GetUserFromNameAsync(string, CancellationToken)
Get a user, with lookup based on user name.
Declaration
public Task<User> GetUserFromNameAsync(string userName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | User name of the user to get. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | User retrieved by name |
GetUserFromPersonIdAsync(int, CancellationToken)
Returns the user associated with the supplied person id
Declaration
public Task<User[]> GetUserFromPersonIdAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User[]> |
GetUserGroupAsync(int, CancellationToken)
Gets a UserGroup object.
Declaration
public Task<UserGroup> GetUserGroupAsync(int userGroupId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userGroupId | The identifier of the UserGroup object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserGroup> | A single UserGroup |
GetUserGroupListAsync(int[], CancellationToken)
Gets an array of UserGroup objects.
Declaration
public Task<UserGroup[]> GetUserGroupListAsync(int[] userGroupIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | userGroupIds | The identifiers of the UserGroup object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserGroup[]> | Array of UserGroup |
GetUserInfoAsync(int, CancellationToken)
Gets a UserInfo object.
Declaration
public Task<UserInfo> GetUserInfoAsync(int userInfoId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userInfoId | The identifier of the UserInfo object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserInfo> | A single UserInfo |
GetUserInfoListAsync(int[], CancellationToken)
Gets an array of UserInfo objects.
Declaration
public Task<UserInfo[]> GetUserInfoListAsync(int[] userInfoIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | userInfoIds | The identifiers of the UserInfo object |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserInfo[]> | Array of UserInfo |
GetUserPresenceStatusAsync(int, CancellationToken)
Get user presence status
Declaration
public Task<UserPresenceStatus> GetUserPresenceStatusAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of user to retrieve status for. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserPresenceStatus> | User presence status |
GetValidUserNameAsync(int, UserType, int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<string> GetValidUserNameAsync(int associateId, UserType type, int personId, string userName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| UserType | type | |
| int | personId | |
| string | userName | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> |
GetValidUserNameForNewUserAsync(User, CancellationToken)
Generates a valid username for an unsaved user
Declaration
public Task<string> GetValidUserNameForNewUserAsync(User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> |
IsNickNameUniqueAsync(int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<bool> IsNickNameUniqueAsync(int associateId, string nickName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| string | nickName | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
IsPasswordValidAsync(int, UserType, int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<bool> IsPasswordValidAsync(int associateId, UserType type, int personId, string password, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| UserType | type | |
| int | personId | |
| string | password | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
IsPasswordValidWithReasonAsync(int, UserType, int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<UserValidationResult> IsPasswordValidWithReasonAsync(int associateId, UserType type, int personId, string password, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| UserType | type | |
| int | personId | |
| string | password | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserValidationResult> |
IsUserNameValidAsync(int, UserType, int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<bool> IsUserNameValidAsync(int associateId, UserType type, int personId, string userName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| UserType | type | |
| int | personId | |
| string | userName | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> |
IsUserNameValidWithReasonAsync(int, UserType, int, string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<UserValidationResult> IsUserNameValidWithReasonAsync(int associateId, UserType type, int personId, string userName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| UserType | type | |
| int | personId | |
| string | userName | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserValidationResult> |
MakeRetiredAsync(int, bool, CancellationToken)
Retiring a user means to remove all licenses, setting person.retired=1 and associate.deleted=1. Unretiering a user means setting person.retired=0 and associate.deleted=0
Declaration
public Task MakeRetiredAsync(int associateId, bool retired, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| bool | retired | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
RegisterWithAccessGatewayAsync(string, CancellationToken)
Registers with access gateway if not already done, otherwise will attempt to update
Declaration
public Task<AccessGatewayInfo> RegisterWithAccessGatewayAsync(string redirectUri, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | redirectUri | This is the registered redirect_uri for AccessGateway OIDC. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<AccessGatewayInfo> |
RemoveLicensesAsync(int, CancellationToken)
Remove all user licenses.
Declaration
public Task RemoveLicensesAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
RemoveOwnerContactAsync(int, CancellationToken)
Remove a contact from the ownercontactlink table
Declaration
public Task RemoveOwnerContactAsync(int contactId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The id of the contact to remove |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
RemoveUntrustedCredentialsAsync(string, string, CancellationToken)
Remove a credentials entry for authenticated user.
Declaration
public Task RemoveUntrustedCredentialsAsync(string type, string publicValue, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credential(Ex: "imap", "smtp") |
| string | publicValue | PublicValue field of credentials to remove. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
RemoveUntrustedCredentialsForAssociateAsync(int, string, string, CancellationToken)
Remove a credentials entry for a specified user.
Declaration
public Task RemoveUntrustedCredentialsForAssociateAsync(int associateId, string type, string publicValue, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Id of user to remove credentials for. |
| string | type | Type of credential(Ex: "imap", "smtp") |
| string | publicValue | PublicValue field of credentials to remove. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
ResolveUserFromInfoAsync(int, string, string[], string[], UserType, Credential, CancellationToken)
Get a user from the provided information. If the user or associated person does not exist, it will be created on demand.
Declaration
public Task<ResolvedUser> ResolveUserFromInfoAsync(int contactId, string personName, string[] phoneNumbers, string[] emails, UserType userType, Credential credential, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | contactId | The contact Id of the contact which the person belongs to. Cannot be 0. |
| string | personName | The full name of the person to be resolved. Optional. |
| string[] | phoneNumbers | Phone numbers registered on the person. Optional. |
| string[] | emails | Email-addresses registered on the person. Optional. |
| UserType | userType | The type of user to look up or create. |
| Credential | credential | The credentials to be used for the user. Required. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ResolvedUser> | The results of the resolve-operation. |
SaveCredentialAsync(int, Credential, CancellationToken)
Save (adds/replaces) current credential of the same type for the user.
Declaration
public Task<bool> SaveCredentialAsync(int userId, Credential credential, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | userId | Primary key of the user (i.e. associate) |
| Credential | credential | Credentials supported for authentication |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the credential was successfully saved. |
SaveExternalTokensAsync(TokenManagementInfo, CancellationToken)
Saves the external tokens to the DB and returns a key that can be used to retrieve them
Declaration
public Task<string> SaveExternalTokensAsync(TokenManagementInfo tokenManagementInfo, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenManagementInfo | tokenManagementInfo | Token information. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> | Key that can be used to retrieve the tokens |
SaveRoleEntityAsync(RoleEntity, CancellationToken)
Updates the existing RoleEntity or creates a new RoleEntity if the id parameter is 0.
Declaration
public Task<RoleEntity> SaveRoleEntityAsync(RoleEntity roleEntity, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| RoleEntity | roleEntity | The RoleEntity that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<RoleEntity> | New or updated RoleEntity |
SaveServiceAuthAsync(ServiceAuth, CancellationToken)
Updates the existing ServiceAuth or creates a new ServiceAuth if the id parameter is 0.
Declaration
public Task<ServiceAuth> SaveServiceAuthAsync(ServiceAuth serviceAuth, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ServiceAuth | serviceAuth | The ServiceAuth that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<ServiceAuth> | New or updated ServiceAuth |
SaveUntrustedCredentialsAsync(string, UntrustedCredentials, CancellationToken)
Save credentials for authenticated user.
Declaration
public Task SaveUntrustedCredentialsAsync(string type, UntrustedCredentials credentials, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | Type of credential(Ex: "imap", "smtp") |
| UntrustedCredentials | credentials | Credentials to save. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SaveUntrustedCredentialsForAssociateAsync(int, string, UntrustedCredentials, CancellationToken)
Save credentials for a specified user.
Declaration
public Task SaveUntrustedCredentialsForAssociateAsync(int associateId, string type, UntrustedCredentials credentials, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Id of user to save credentials for. |
| string | type | Type of credential(Ex: "imap", "smtp") |
| UntrustedCredentials | credentials | Credentials to save. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SaveUserAsync(User, CancellationToken)
Updates the existing User or creates a new User if the id parameter is 0.
Declaration
public Task<User> SaveUserAsync(User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | The User that is saved |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | New or updated User |
SaveUserFromNameAsync(string, User, CancellationToken)
Save a user, with lookup based on the user name.
Declaration
public Task<User> SaveUserFromNameAsync(string userName, User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userName | User name of the user to get. |
| User | user | User object to save. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<User> | User retrieved by name |
SaveUserGroupAsync(UserGroup, CancellationToken)
Save a user group. Set UserGroup.Deleted to mark a user group as deleted and invisible in the user interface.
Declaration
public Task<UserGroup> SaveUserGroupAsync(UserGroup userGroup, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| UserGroup | userGroup | UserGroup to save |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserGroup> | UserGroup as saved to the database |
SendChangePasswordEMailAsync(int, CancellationToken)
Send a change password email to this users registered address.
Declaration
public Task<OperationResult> SendChangePasswordEMailAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of the user to change password for. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<OperationResult> | Result - with result flag and optional error reason. |
SetDataRightAsync(int, string, RoleRelationToOwner, string, CancellationToken)
Set one specific data right at the given position. An exception will be thrown if non existing position is specified.
Declaration
public Task SetDataRightAsync(int roleId, string tableName, RoleRelationToOwner relationToOwner, string dataRightValue, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to set the data right for |
| string | tableName | The name of the entity/table |
| RoleRelationToOwner | relationToOwner | The id of the relation to owner |
| string | dataRightValue | The data right value to set at the specified position (CRUD) |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetExternalUserInfoAsync(int, string, string, bool, int, ExternalUserInfoModification, CancellationToken)
Modifies an external user. Changes external users information according to the flags set in externalUserInfoModification.
Declaration
public Task SetExternalUserInfoAsync(int associateId, string userName, string password, bool isActive, int roleId, ExternalUserInfoModification externalUserInfoModification, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | The associateId to alter. |
| string | userName | Login username. |
| string | password | Login password. |
| bool | isActive | Set isActive to true to enable the external user to log in. |
| int | roleId | Id of role for the external user. The role must be a role of type external users. |
| ExternalUserInfoModification | externalUserInfoModification | externalUserInfoModification is a flag describing what to change. <see cref="SuperOffice.CRM.Services.Util.ExternalUserInfoModification"/>. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetFunctionalRightsAsync(int, int[], CancellationToken)
Set all functional rights for the given role. Functional rights not specified here will be removed from the role.
Declaration
public Task SetFunctionalRightsAsync(int roleId, int[] functionalRightIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | roleId | The role id to set the functional rights for |
| int[] | functionalRightIds | An array of functional rights ids to set for this role. Rights not included here are removed from the role. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task |
SetGeneratedPasswordAsync(int, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<string> SetGeneratedPasswordAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> |
SetGeneratedPasswordFromNameAsync(string, CancellationToken)
Proxy class for the User Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.
Online Restricted: This agent is not available in Online by default. User management is not allowed for partner apps.Declaration
public Task<string> SetGeneratedPasswordFromNameAsync(string associateName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | associateName | |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<string> |
SetPasswordAsync(int, string, CancellationToken)
Change password for a user.
Declaration
public Task<bool> SetPasswordAsync(int associateId, string password, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | Id of User to set password for |
| string | password | New password |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | Succeeded? |
SetPasswordFromNameAsync(string, string, CancellationToken)
Change password for a user.
Declaration
public Task<bool> SetPasswordFromNameAsync(string associateName, string password, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | associateName | Username to set password for |
| string | password | New password |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<bool> | Succeeded? |
SetUserPresenceStatusAsync(int, UserPresenceStatus, CancellationToken)
Set user presence status
Declaration
public Task<UserPresenceStatus> SetUserPresenceStatusAsync(int associateId, UserPresenceStatus userPresenceStatus, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | AssociateId of user to set status for. |
| UserPresenceStatus | userPresenceStatus | User presence status to set |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<UserPresenceStatus> | User presence status |
ValidateUserAsync(User, CancellationToken)
Check that entity is ready for saving, return error messages by field.
Declaration
public Task<StringDictionary> ValidateUserAsync(User user, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| User | user | Entity to be checked for errors. |
| CancellationToken | cancellationToken | This operation cannot be cancelled; the cancellationToken parameter is ignored |
Returns
| Type | Description |
|---|---|
| Task<StringDictionary> | Error messages tagged by field. |