Share via


AppCapability.RequestAccessForCapabilitiesForUserAsync Method

Definition

Requests access to multiple capabilities simultaneously.

public:
 static IAsyncOperation<IMapView<Platform::String ^, AppCapabilityAccessStatus> ^> ^ RequestAccessForCapabilitiesForUserAsync(User ^ user, IIterable<Platform::String ^> ^ capabilityNames);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IMapView<winrt::hstring, AppCapabilityAccessStatus>> RequestAccessForCapabilitiesForUserAsync(User const& user, IIterable<winrt::hstring> const& capabilityNames);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyDictionary<string,AppCapabilityAccessStatus>> RequestAccessForCapabilitiesForUserAsync(User user, IEnumerable<string> capabilityNames);
function requestAccessForCapabilitiesForUserAsync(user, capabilityNames)
Public Shared Function RequestAccessForCapabilitiesForUserAsync (user As User, capabilityNames As IEnumerable(Of String)) As IAsyncOperation(Of IReadOnlyDictionary(Of String, AppCapabilityAccessStatus))

Parameters

user
User

The user property for which the object was created.

capabilityNames

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

The capability name strings.

Returns

Returns a read-only Dictionary with string capabilities as keys to AppCapabilityAccessStatus enums.

Attributes

Remarks

RequestAccessForCapabilitiesForUserAsync does not create any new objects and can cause a user prompt to appear.

Note: Must be called from the UI thread.

Applies to

See also