Share via


CortanaPermissionsManager Class

Definition

Provides access to the users Cortana authorization settings.

public ref class CortanaPermissionsManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CortanaPermissionsManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("CortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
class CortanaPermissionsManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CortanaPermissionsManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("CortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
public sealed class CortanaPermissionsManager
Public NotInheritable Class CortanaPermissionsManager
Inheritance
Object Platform::Object IInspectable CortanaPermissionsManager
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)
App capabilities
cortanaPermissions

Remarks

This is a static class, you do not need to get a CortanaPermissionsManager object to access its members.

The CortanaPermissionManager class requires the following be added to the Package.appmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • Under <Capabilities>
    • <rescap:capability name="cortanaPermissions"/>

Methods

ArePermissionsGrantedAsync(IIterable<CortanaPermission>)

Asynchronously retreives whether the specified permissions are granted.

GetDefault()

Retrieves the Cortana permissions for the current user.

GrantPermissionsAsync(IIterable<CortanaPermission>)

Asynchronously grants the specified set of Cortana permissions.

IsSupported()

Retrieves whether Cortana is supported.

RevokePermissionsAsync(IIterable<CortanaPermission>)

Asynchronously revokes the specified set of Cortana permissions.

Applies to