User​Consent​Verification​Result User​Consent​Verification​Result User​Consent​Verification​Result User​Consent​Verification​Result Enum

Definition

Describes the result of a verification operation.

public : enum class UserConsentVerificationResultpublic enum UserConsentVerificationResultPublic Enum UserConsentVerificationResult// You can use this enum in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The following example shows a method that requests fingerprint verification and returns a message that describes the result based on the UserConsentVerificationResult value.

private async System.Threading.Tasks.Task<string> RequestConsent(string userMessage)
{
    string returnMessage;

    if (String.IsNullOrEmpty(userMessage))
    {
        userMessage = "Please provide fingerprint verification.";
    }

    try
    {
        // Request the logged on user's consent via fingerprint swipe.
        var consentResult = await Windows.Security.Credentials.UI.UserConsentVerifier.RequestVerificationAsync(userMessage);

        switch (consentResult)
        {
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.Verified:
                returnMessage = "Fingerprint verified.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.DeviceBusy:
                returnMessage = "Biometric device is busy.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.DeviceNotPresent:
                returnMessage = "No biometric device found.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.DisabledByPolicy:
                returnMessage = "Biometric verification is disabled by policy.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.NotConfiguredForUser:
                returnMessage = "The user has no fingerprints registered. Please add a fingerprint to the " +
                                "fingerprint database and try again.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.RetriesExhausted:
                returnMessage = "There have been too many failed attempts. Fingerprint authentication canceled.";
                break;
            case Windows.Security.Credentials.UI.UserConsentVerificationResult.Canceled:
                returnMessage = "Fingerprint authentication canceled.";
                break;
            default:
                returnMessage = "Fingerprint authentication is currently unavailable.";
                break;
        }
    }
    catch (Exception ex)
    {
        returnMessage = "Fingerprint authentication failed: " + ex.ToString();
    }

    return returnMessage;
}
function requestConsent(userMessage) {
    if (!userMessage) {
        userMessage = "Please provide fingerprint verification.";
    }

    try {
        // Request the logged on user's consent via fingerprint swipe.
        Windows.Security.Credentials.UI.UserConsentVerifier.requestVerificationAsync(userMessage) 
        .then(
            function (consentResult) { 
                switch (consentResult) {
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.verified:
                        outputDiv.innerHTML = "<br/>Fingerprint verified.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.deviceBusy:
                        outputDiv.innerHTML = "<br/>Biometric device is busy.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.deviceNotPresent:
                        outputDiv.innerHTML = "<br/>No biometric device found.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.disabledByPolicy:
                        outputDiv.innerHTML = "<br/>Biometric verification is disabled by policy.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.notConfiguredForUser:
                        outputDiv.innerHTML = "<br/>The user has no fingerprints registered. Please add a fingerprint to the " +
                                        "fingerprint database and try again.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.retriesExhausted:
                        outputDiv.innerHTML = "<br/>There have been too many failed attempts. Fingerprint authentication canceled.";
                        break;
                    case Windows.Security.Credentials.UI.UserConsentVerificationResult.canceled:
                        outputDiv.innerHTML = "<br/>Fingerprint authentication canceled.";
                        break;
                    default:
                        outputDiv.innerHTML = "<br/>Fingerprint authentication is currently unavailable.";
                        break;
                }
            });
    }
    catch (ex) {
        outputDiv.innerHTML = "<br/>Fingerprint authentication failed: " + ex.toString();
    }
}

Fields

Canceled Canceled Canceled Canceled

The verification operation was canceled.

DeviceBusy DeviceBusy DeviceBusy DeviceBusy

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

DeviceNotPresent DeviceNotPresent DeviceNotPresent DeviceNotPresent

There is no biometric verifier device available.

DisabledByPolicy DisabledByPolicy DisabledByPolicy DisabledByPolicy

Group policy has disabled the biometric verifier device.

NotConfiguredForUser NotConfiguredForUser NotConfiguredForUser NotConfiguredForUser

A biometric verifier device is not configured for this user.

RetriesExhausted RetriesExhausted RetriesExhausted RetriesExhausted

After 10 attempts, the original verification request and all subsequent attempts at the same verification were not verified.

Verified Verified Verified Verified

The fingerprint was verified.

See Also