User Manager (.NET)

Users are individuals who have access to the Relativity environment. For general information, see Users on the Relativity Documentation site. The User Manager API exposes multiple operations that you can use to programmatically manage users in your Relativity environment. It includes the following features:

  • Supports create, read, update, and delete operations on users.
  • Supports read and update operations on the settings of the current users.
  • Provides helper methods used to retrieve the available user types.
  • Retrieval of all users from a workspace or admin-level context.

Sample use cases

  • Developing a custom tool to import users in Relativity.
  • Updating properties like the name or the email of the logged user or any other user in Relativity.
  • Retrieve user information for display in a view for a custom application.

You can also use the User service through the REST API. For more information, see User Manager (REST).

This page contains the following information:

The Relativity.Identity.SDK contains this API. For compatibility and package installation instructions, see Download the SDKs and NuGet packages.

Fundamentals for managing users

Guidelines and considerations

You can use the following sample workflow to add users to your Relativity environment:

  1. Retrieve a list of user types available in a Relativity environment.
  2. Retrieve a list of available clients. You can use the Object Manager to query for clients.
  3. Add the user.

Methods

The IUserManager interface in the Relativity.Identity.{versionNumber}.Services namespace exposes the following methods:

  • CreateAsync() - adds a new user to a Relativity environment. It returns a UserResponse object containing the Artifact ID and other properties of the new user.
  • ReadAsync() - retrieves advanced metadata for a user, including their Relativity access, name, email, and other properties. You can also use this overloaded method to return extended metadata, including information about the operations that you have permissions to perform on the user, such as update or delete.
  • UpdateAsync() - modifies the properties of a user (e.g., email, first and last name, etc.). You can use also this overloaded method to restrict the update of a user based on the date that it was last modified using the following optional parameters:
    • lastModifiedOn - the date and time used for comparison with the last modified date assigned to the user.
    • cancel - a request to cancel the execution of the operation.
  • DeleteAsync() - removes a user from Relativity. This overloaded method supports functionality for requesting the cancellation of the delete.
  • ReadSettingsAsync() - retrieves the settings of the current user, including its email, first name, last name, and others.
  • UpdateSettingsAsync() - modifies the user setting properties of the current user. You can also use an overloaded method containing the following optional parameters:
    • lastModifiedOn - the date and time used for comparison with the last modified date assigned to the user.
    • cancel - a request to cancel the execution of the operation.
  • ReadActiveUsersAsync() - asynchronously retrieves a list of all active users in a workspace. If the number of returned users exceeds the ChoiceLimitForUI setting, no users will be returned.
  • ReadAllUsersAsync() - asynchronously retrieves a list of all users in a workspace, including administrators and (optional) deleted users.
  • RetrieveAllWithRelativityAccessAsync() - asynchronously retrieves a list of users from the specified workspace that have Relativity access (use -1 for Admin workspace).
  • RetrieveCurrentAsync() - asynchronously retrieves the current user in the specified workspace. NOTE: User Artifact ID may differ for the same user in different workspaces.
  • RetrieveUsersBy() - gets a list of users and their information, and supports filtering, ordering, and paging these results.
  • QueryEligibleGroupsToAddUsersToAsync() - query for Groups that are eligible for adding at least one of specified users. You can also use an overloaded method containing the following optional parameters:
    • progress - a callback that reports query execution progress..
    • cancel - a request to cancel the execution of the operation.
  • QueryGroupsByUserAsync() - query for groups the user is a member of.
  • GetAvailableTypesAsync() - retrieves a list containing all the available choices for the user type.

Classes and enumeration

  • DocumentViewerProperties class - represents user properties that are related to the document viewer. The UserRequest and UserResponse classes have a property of this type.
  • DocumentViewerFileType enumeration - indicates the default viewer mode.
  • DocumentViewer enumeration - indicates which viewer the user can access when reviewing documents.
  • EmailPreference enumeration - indicates the preference for email notifications when adding or deleting users or groups.
  • UserRequest class - represents the data used to create or update a user. The CreateAsync() and UpdateAsync() methods take an object of this type. Its properties include the email, first and last name, user type, and others.
  • UserResponse class - represents the results of a read operation. The ReadAsync(), CreateAsync() and UpdateAsync() methods return an object of this type. Its properties include the email, first and last name, user type, and others.
  • UserSettingRequest class - represents the data used to update the settings of the current user. The UpdateSettingsAsync() methods take an object of this type. Its properties include the email, first and last name, email preference, and others.
  • UserSettingResponse class - represents the results of a read settings operation. The ReadSettingsAsync() and UpdateSettingsAsync() methods return an object of this type. Its properties include the email, first and last name, email preference, and others.

Code samples

Create a user

Retrieve metadata for a user

Retrieve settings of the current user

Update the properties of a user

Update the settings of the current user

Delete a user

Retrieve all the available types for the user

Retrieve all users for a given workspace

Query for users in a given workspace