AppServiceTriggerDetails.CheckCallerForCapabilityAsync(String) AppServiceTriggerDetails.CheckCallerForCapabilityAsync(String) AppServiceTriggerDetails.CheckCallerForCapabilityAsync(String) AppServiceTriggerDetails.CheckCallerForCapabilityAsync(String) AppServiceTriggerDetails.CheckCallerForCapabilityAsync(String) Method

Definition

Determines whether the caller of the app service has the specified capability.

public : IAsyncOperation<Platform::Boolean> CheckCallerForCapabilityAsync(Platform::String capabilityName)
IAsyncOperation<bool> CheckCallerForCapabilityAsync(winrt::hstring capabilityName) const;
public IAsyncOperation<bool> CheckCallerForCapabilityAsync(String capabilityName)
Public Function CheckCallerForCapabilityAsync(capabilityName As String) As IAsyncOperation(Of bool)
Windows.ApplicationModel.AppService.AppServiceTriggerDetails.checkCallerForCapabilityAsync(capabilityName).done( /* Your success and error handlers */ );

Parameters

capabilityName
String String String

The name of the capability.

Returns

True if it was possible to get the capabilities of the caller and the caller has the specified capability; false otherwise.

Additional features and requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

This API can only be called from within an app that is marked as an app service in its manifest. One use of this function is to determine whether a caller has the specified capability and, based on that, decide whether to share the requested data, a subset of the data, or no data.