UserConsentVerifierAvailability UserConsentVerifierAvailability UserConsentVerifierAvailability UserConsentVerifierAvailability UserConsentVerifierAvailability Enum

Definition

Describes the result of a check for a biometric (fingerprint) verifier device.

public : enum class UserConsentVerifierAvailability
enum class winrt::Windows::Security::Credentials::UI::UserConsentVerifierAvailability : int32_t
public enum UserConsentVerifierAvailability
Public Enum UserConsentVerifierAvailability
var value = Windows.Security.Credentials.UI.UserConsentVerifierAvailability.available;
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Fields

Available Available Available Available Available 0

A biometric verifier device is available.

DeviceBusy DeviceBusy DeviceBusy DeviceBusy DeviceBusy 4

The biometric verifier device is performing an operation and is unavailable.

DeviceNotPresent DeviceNotPresent DeviceNotPresent DeviceNotPresent DeviceNotPresent 1

There is no biometric verifier device available.

DisabledByPolicy DisabledByPolicy DisabledByPolicy DisabledByPolicy DisabledByPolicy 3

Group policy has disabled the biometric verifier device.

NotConfiguredForUser NotConfiguredForUser NotConfiguredForUser NotConfiguredForUser NotConfiguredForUser 2

A biometric verifier device is not configured for this user.

Remarks

You can use the CheckAvailabilityAsync method to determine if fingerprint authentication is supported for the current computer.

The following example shows a method that checks to see if fingerprint authentication is supported for the current computer and returns a message that describes the result based on the UserConsentVerifierAvailability value.

public async System.Threading.Tasks.Task<string> CheckFingerprintAvailability()
{
    string returnMessage = "";

    try
    {
        // Check the availability of fingerprint authentication.
        var ucvAvailability = await Windows.Security.Credentials.UI.UserConsentVerifier.CheckAvailabilityAsync();

        switch (ucvAvailability)
        {
            case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.Available:
                returnMessage = "Fingerprint verification is available.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.DeviceBusy:
                returnMessage = "Biometric device is busy.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.DeviceNotPresent:
                returnMessage = "No biometric device found.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.DisabledByPolicy:
                returnMessage = "Biometric verification is disabled by policy.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.NotConfiguredForUser:
                returnMessage = "The user has no fingerprints registered. Please add a fingerprint to the " +
                                "fingerprint database and try again.";
                break;
            default:
                returnMessage = "Fingerprints verification is currently unavailable.";
                break;
        }
    }
    catch (Exception ex)
    {
        returnMessage = "Fingerprint authentication availability check failed: " + ex.ToString();
    }

    return returnMessage;
}
function checkFingerprintAvailability() {
    try {
        // Check the availability of fingerprint authentication.

        Windows.Security.Credentials.UI.UserConsentVerifier.checkAvailabilityAsync().then(
        function (ucvAvailability) {

            switch (ucvAvailability)
            {
                case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.available:
                    outputDiv.innerHTML = "<br/>Fingerprint verification is available.";
                    break;
                case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.deviceBusy:
                    outputDiv.innerHTML = "<br/>Biometric device is busy.";
                    break;
                case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.deviceNotPresent:
                    outputDiv.innerHTML = "<br/>No biometric device found.";
                    break;
                case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.disabledByPolicy:
                    outputDiv.innerHTML = "<br/>Biometric verification is disabled by policy.";
                    break;
                case Windows.Security.Credentials.UI.UserConsentVerifierAvailability.notConfiguredForUser:
                    outputDiv.innerHTML = "<br/>The user has no fingerprints registered. Please add a fingerprint to the " +
                                    "fingerprint database and try again.";
                    break;
                default:
                    outputDiv.innerHTML = "<br/>Fingerprints verification is currently unavailable.";
                    break;
            }
        });
    }
    catch (ex) {
        outputDiv.innerHTML = "<br/>Fingerprint authentication availability check failed: " + ex.toString();
    }
}

See also