ProtectionPolicyManager.CreateCurrentThreadNetworkContext(String) ProtectionPolicyManager.CreateCurrentThreadNetworkContext(String) ProtectionPolicyManager.CreateCurrentThreadNetworkContext(String) ProtectionPolicyManager.CreateCurrentThreadNetworkContext(String) ProtectionPolicyManager.CreateCurrentThreadNetworkContext(String) Method

Definition

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Creates a ThreadNetworkContext protected to an enterprise identity. The creation of the context tags all network connections made thereafter on the current thread with the identity, and allows access to enterprise resources that are access controlled by the enterprise's policy.

public : static ThreadNetworkContext CreateCurrentThreadNetworkContext(Platform::String identity)
static ThreadNetworkContext CreateCurrentThreadNetworkContext(winrt::hstring identity) const;
public static ThreadNetworkContext CreateCurrentThreadNetworkContext(String identity)
Public Shared Function CreateCurrentThreadNetworkContext(identity As String) As ThreadNetworkContext
var threadNetworkContext = Windows.Security.EnterpriseData.ProtectionPolicyManager.createCurrentThreadNetworkContext(identity);

Parameters

identity
String String String

The enterprise identity. This is an email address or domain that is managed. This may be returned from GetPrimaryManagedIdentityForNetworkEndpoint; otherwise your app should use IsIdentityManaged to confirm that an email address or domain is managed.

Returns

The protected network context. The app must call ThreadNetworkContext.Close after access to the resource is completed.

Additional features and requirements

Capabilities
enterpriseDataPolicy

See also