Share via


RemoteSystemConnectionRequest.CreateFromConnectionTokenForUser Method

Definition

Returns a RemoteSystemConnectionRequest based on a ConnectionToken and a specific user.

public:
 static RemoteSystemConnectionRequest ^ CreateFromConnectionTokenForUser(User ^ user, Platform::String ^ connectionToken);
 static RemoteSystemConnectionRequest CreateFromConnectionTokenForUser(User const& user, winrt::hstring const& connectionToken);
public static RemoteSystemConnectionRequest CreateFromConnectionTokenForUser(User user, string connectionToken);
function createFromConnectionTokenForUser(user, connectionToken)
Public Shared Function CreateFromConnectionTokenForUser (user As User, connectionToken As String) As RemoteSystemConnectionRequest

Parameters

user
User

The specific User for which the RemoteSystemConnectionRequest will be created for.

connectionToken
String

Platform::String

winrt::hstring

The specific connection token for which the RemoteSystemConnectionRequest will be created with.

Returns

An instance of the RemoteSystemConnectionRequest class.

Windows requirements

Device family
Windows 10, version 1903 (introduced in 10.0.18362.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v8.0)

Remarks

CreateFromConnectionTokenForUser requires the RemoteSystem capability on Windows, and it requires the RemoteSystem::RequestAccessAsync function to have been called previously. Calling without both of these permissions results in an exception.

Applies to

See also

  • <xref:Windows.System.RemoteSystems.RemoteSystemConnectionRequest.ConnectionToken%0aM%3aWindows.System.RemoteSystems.RemoteSystemConnectionRequest.CreateFromConnectionToken(System.String)>