CreatePatientConnection Method

Asks HealthVault to create a pending patient connection for the application specified by the connection with the specified user specific parameters.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: (1.15.1003.9505)

public static string CreatePatientConnection(
	OfflineWebApplicationConnection connection,
	string friendlyName,
	string securityQuestion,
	string securityAnswer,
	Uri callbackUrl,
	string applicationPatientId


Type: Microsoft.Health.Web..::..OfflineWebApplicationConnection
The connection to HealthVault. The application ID in the connection is used when making the patient connection.
Type: System..::..String
A friendly name for the patient connection which will be shown to the user when they go to HealthVault Shell to validate the connection.
Type: System..::..String
A question (usually provided by the patient) to which the patient must provide the answer when they go to validate the connection in the HealthVault Shell.
Type: System..::..String
The answer to the securityQuestion which the patient must use when validating the connection in HealthVault Shell. The answer is case-insensitive but otherwise must match exactly. In most cases it is recommended that this is a single word to prevent entry problems when validating the connection.
Type: System..::..Uri
Not yet implemented. May be null.
Type: System..::..String
The application specific identifier for the user. This identifier is used to uniquely identify the user in the application data storage whereas the HealthVault person ID is used to identify the person in HealthVault.

Return Value

A token that the application must give to the patient to use when validating the connection request.

System..::..ArgumentNullException If connection is null.
System..::..ArgumentException If friendlyName, securityQuestion, securityAnswer, or applicationPatientId is null or empty.
Microsoft.Health..::..HealthServiceException If an error occurs when contacting HealthVault.