Share via


VpnChannel.RequestCredentials Method

Definition

Request the VPN platform to collect credentials from the user. The plug-in can specify the type and form of credentials to collect. The result is an object containing the main credentials depending on the type and the secondary credentials for change and expiration cases.

public:
 virtual VpnPickedCredential ^ RequestCredentials(VpnCredentialType credType, bool isRetry, bool isSingleSignOnCredential, Certificate ^ certificate) = RequestCredentials;
VpnPickedCredential RequestCredentials(VpnCredentialType const& credType, bool const& isRetry, bool const& isSingleSignOnCredential, Certificate const& certificate);
public VpnPickedCredential RequestCredentials(VpnCredentialType credType, bool isRetry, bool isSingleSignOnCredential, Certificate certificate);
function requestCredentials(credType, isRetry, isSingleSignOnCredential, certificate)
Public Function RequestCredentials (credType As VpnCredentialType, isRetry As Boolean, isSingleSignOnCredential As Boolean, certificate As Certificate) As VpnPickedCredential

Parameters

credType
VpnCredentialType

An enum value indicating type of credential to collect.

isRetry
Boolean

bool

If the request is a retry from as previous failed attempt, it is TRUE; otherwise, it is FALSE.

isSingleSignOnCredential
Boolean

bool

If the credential should be used by all applications operating over the VPN tunnel and authenticating to resources on the VPN, it is TRUE; otherwise, it is FALSE. This provides a single sign on experience over the VPN.

certificate
Certificate

The certificate that can be optionally passed to indicate the platform its intention of use and obtain consent and unlock its protection.

Returns

An object containing the main credentials and any other transitional credentials filled by the user.

Windows requirements

App capabilities
networkingVpnProvider

Remarks

If the function succeeds, the return value is S_OK, otherwise the function will return an error HRESULT value describing the specific failure. If the plug-in is not connected, the error is E_ACCESSDENIED. If there is no more memory available, the error is E_OUTOFMEMORY.

Note

Any call to this API outside of a connected VPN plug-in will fail, as activity and interactions between the VPN plug-in and the system are controlled by the VPN profile.

Applies to