PIServer.ConnectWithPrompt Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Connects to the server prompting for credentials.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void ConnectWithPrompt()
Public Sub ConnectWithPrompt Dim instance As PIServer instance.ConnectWithPrompt()
public: void ConnectWithPrompt()
member ConnectWithPrompt : unit -> unit
Remarks
The choice of PIAuthenticationMode in the prompt dialog is only displayed if the AllowExplicit option is set in the AuthenticationOptions setting. If OIDC has been enabled for the PIServer the choice of OpenIDConnectAuthentication will be given.
If an application accesses a property or invokes a method that requires server access, an implicit connection is performed. When a connection is no longer needed, it can be closed using the Disconnect method.
| When using this method to connect to a PIServer with an explicit login, the AuthenticationOptions order will be ignored. Even if Windows is not listed, the WindowsAuthentication will be attempted if the user selects it. The PIUserAuthentication mode is only allowed when the AllowExplicit option is set in the AuthenticationOptions setting. The OpenIDConnectAuthentication mode is only allowed if OIDC has been enabled for the PIServer |