Choose your language

Choose your login


Managing PaperCut MF/NG Shared Accounts and User Settings via IDM Integration


Management of users within PaperCut MF/NG is usually handled through integration with a directory source such as Active Directory or LDAP. For sites that do not have Active Directory or LDAP then a custom sync plugin can be used.

Sites with a high volume of changes to User Accounts & Shared Accounts can also take advantage of the PaperCut web services API to configure information. For example, user configuration settings, new Shared Account codes and their configuration, and importantly the relationship between the two. This technical article shows an example of how that might work.

Some sites also require the automation of Papercut MF/NG internal user accounts and this can also be managed via the web services API (not shown here).

A number of larger installations are taking advantage of this style of integration as IDM solutions mature and allow for custom hook-ins to be written in languages like Java, Python or C#.

Interfacing into PaperCut

PaperCut includes everything you need to make use of this API. The API is hosted as part of the PaperCut Application Server and don’t require any additional licensing to take advantage of them. PaperCut also ships with a ServerCommandProxy class (for C# and Java) that abstracts the XML-RPC calls and provides these web service calls as functions of an object. If you can create an instance of a class and call its methods you will be able to integrate with PaperCut. This approach used in the example code below.

For more information on using the web services API please see this Top Tips knowledge base article.

Use case

In this example, we will consider the creation of an internal user that is required to charge their jobs to a secondary Shared Account. This is a common scenario for employees in professional industry (Lawyers charging to Matters) as well as education (Staff charging to Departments).

An introduction to the API can be found here. For this particular task, the method calls required are:

  1. isUserExists - Test to see if a user exists in the system/database.
  2. addNewUser - Triggers the process of adding a new user account defined by a given username from an external directory (possibly the custom plug in).
  3. setUserProperty - Sets a user property. Properties include the user’s full name, department, email, notes, office, password (for internal users) and restriction status among others.
  4. setUserAccountSelectionStandardPopup - Sets a user’s account selection to standard account selection popup.
  5. isSharedAccountExists - Test to see if a shared account exists in the system/database.
  6. addNewSharedAccount - Create a new shared account with the given name.
  7. AddSharedAccountAccessUser - Allow the given user access to the given shared account without using a pin.

Pseudocode process

The pseudocode of the process would be

  1. Connect to the PaperCut Server
  2. If the username doesn’t exist
    1. Create the user
  3. Configure the user to be unrestricted (unlimited copy and print)
  4. Configure the user to select a Shared Account for their transactions
  5. For each of the Departments/Matters this user should be able to access
    1. If the Department/Matter doesn’t exist
      1. Create the Department/Matter
    2. If this user doesn’t have access to charge to this Department/Matter
      1. Grant this user the ability to charge to the Department/Matter

C# example

Categories: How-to Articles , User Management , Scripting and APIs

Keywords: IDM , FIM , ID Vault


Last updated June 13, 2024