Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIServer.ConnectWithPrompt Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIServer.ConnectWithPrompt Method
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.

Note Note
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

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in