PIServer.CurrentUserName Property
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
Gets the user name of the person who is currently logged on to the PIServer server.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7
Syntax
public string CurrentUserName { get; }
Public ReadOnly Property CurrentUserName As String Get Dim instance As PIServer Dim value As String value = instance.CurrentUserName
public: property String^ CurrentUserName { String^ get (); }
member CurrentUserName : string with get
Property Value
Type: StringThe user name of the person who is currently logged on to the PIServer server.
Remarks
If not connected to the PIServer, then accessing this property will NOT
automatically connect to the server. When not connected, this property will return a string
indicating that it is not currently connected to the server.