Managing PaperCut MF/NG Shared Accounts and User Settings via IDM Integration
Contents
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).
Recommended API calls
An introduction to the API can be found here. For this particular task, the method calls required are:
isUserExists
- Test to see if a user exists in the system/database.addNewUser
- Triggers the process of adding a new user account defined by a given username from an external directory (possibly the custom plug in).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.setUserAccountSelectionStandardPopup
- Sets a user’s account selection to standard account selection popup.isSharedAccountExists
- Test to see if a shared account exists in the system/database.addNewSharedAccount
- Create a new shared account with the given name.AddSharedAccountAccessUser
- Allow the given user access to the given shared account without using a pin.
Pseudocode process
The pseudocode of the process would be
- Connect to the PaperCut Server
- If the username doesn’t exist
- Create the user
- Configure the user to be unrestricted (unlimited copy and print)
- Configure the user to select a Shared Account for their transactions
- For each of the Departments/Matters this user should be able to access
- If the Department/Matter doesn’t exist
- Create the Department/Matter
- If this user doesn’t have access to charge to this Department/Matter
- Grant this user the ability to charge to the Department/Matter
- If the Department/Matter doesn’t exist
C# example
Categories: How-to Articles , User Management , Scripting and APIs
Keywords: IDM , FIM , ID Vault
Last updated July 4, 2024
Comments