Skip to main content
Security
PI SDK
PI Server Administration

Searching for Usernames Across Multiple PI Servers: Methods, Challenges, and the Road Ahead

Managing user accounts across several PI Servers is often a challenge. In this post, we review current community-driven solutions for searching usernames across multiple PI Data Archive servers and discuss future enhancements to PI System management capabilities.

Roshan Soni

6 min read

Searching for Usernames Across Multiple PI Servers: Methods, Challenges, and the Road Ahead

Managing user accounts in large OSIsoft PI System environments can become a daunting administrative task—especially when dealing with multiple PI Data Archive servers spread across an organization. One common scenario is the need to determine whether a particular user exists on any (or all) of the configured PI Servers. Due to native PI System tooling limitations, system administrators often resort to manual searches or custom scripts, both of which have their challenges. In this post, we’ll explore several pragmatic approaches and discuss upcoming enhancements from OSIsoft that promise to streamline this use case.

Why Is Multi-Server User Search Needed?

Larger PI deployments often feature tens—or even hundreds—of PI Data Archive servers, each potentially carrying its own user definitions, PI Identities, trusts, and mapped Active Directory (AD) users or groups. Gaining a holistic view of user presence or troubleshooting access issues requires the ability to search across all servers for a given username or identity. Unfortunately, the PI System Management Tools (SMT) and PI SDK currently lack an out-of-the-box feature to do this.

Community Solutions

A lively discussion in the PI developer community has yielded several creative approaches, each with pros and cons:

1. C# Hybrid with PI SDK and LinqToPi/PIOLEDB

By iterating through the known PI Server list (using the PI SDK), and then leveraging LinqToPi or PI OLEDB to query for users, administrators can automate the search with minimal code. This approach offers flexibility but may run into performance bottlenecks on large servers, especially since the PI SDK’s PIUsers.Find method is not implemented.

Example Pseudocode Approach:

foreach (Server in PI_SDK.Servers)
    Connect to Server
    Query user list with LinqToPi or PIOLEDB
    If user found: Add to result

2. Batch Approach Using PICONFIG Scripts

PICONFIG, a command-line utility for scripting administrative PI operations, can be scripted to list all users per server.

Typical Workflow:

  • Create a PICONFIG input script to list all users (LISTUSERS.INP).
  • Run a batch file that executes PICONFIG for each server, appending output to a consolidated file.

This method requires minimal programming and leverages built-in PI tools, making it accessible for administrators without .NET development experience.

3. VBA with PI SDK

Some users have chosen to automate the process using VBA, which leverages the PI SDK in environments like Excel or Access. This is particularly effective for quick-and-dirty admin tools, enabling results to be written directly to spreadsheets.

4. Pure PI SDK (VB.NET/C#)

A straightforward approach using only the PI SDK involves connecting to each known server, looping through each server’s PIUsers collection, and matching usernames. This method is cleanly integrated but may not scale well due to the aforementioned lack of efficient search functions (such as a Find method on PIUsers).

Performance Considerations

All approaches that iterate through potentially large user lists may encounter scalability and performance issues. The inability to execute targeted queries against the server-side user store can result in slow search times, especially as the number of servers and users increases. This highlights the need for improved server APIs.

The Road Ahead: OSIsoft Enhancements

Recognizing these pain points, OSIsoft (now part of AVEVA) is planning several enhancements for the PI SDK (notably version 1.4.0) to significantly improve identity and security management:

  • Authorization Collections: New collections for identities and security attributes
  • Trust Configuration Management: APIs to better manage PI Trust entries
  • ACL String Parser/Builder: Toolkit objects for handling Access Control List (ACL) strings

These improvements will enable better automation and more feature-complete admin tools moving forward. Feedback and feature requests to OSIsoft also continue to influence enhancements to the PI System Management Tools (SMT), such as potentially adding multi-server search capabilities natively.

Best Practices / Recommendations

  • Document all PI Data Archive servers and ensure you have programmatic access via SDK or command-line tools.
  • Use scripted or coded solutions appropriate to your skill set and environment (e.g., C#, VBA, or batch scripting with PICONFIG).
  • Monitor community forums and OSIsoft release notes for upcoming official enhancements.
  • Where possible, migrate to PI System versions that include improved identity and security management features.

Conclusion

While searching for users across multiple PI Servers is currently a manual or semi-automated process, savvy PI administrators can employ a mix of SDK programming and scripting to streamline the task. Future enhancements from OSIsoft promise to address these workflow gaps, making multi-server user management more efficient and robust.

Have you built a multi-server user search tool for your PI environment? Share your experiences and tips below!

Tags

#PI-SDK
#VBA
#PI OLEDB
#C#
#PI Trust
#Security
#piconfig
#VB.NET
#SMT
#PIUsers
#PIIdentity
#Administration
#LinqToPI

About Roshan Soni

Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.

Sign in to comment

Join the conversation by signing in to your account.

Comments (0)

No comments yet

Be the first to share your thoughts on this article.

Related Articles

Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead

A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.

Roshan Soni

Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB

Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.

Roshan Soni

Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?

Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.

Roshan Soni