ICredentialProviderUserArray interface

Represents the set of users that will appear in the logon or credential UI. This information enables the credential provider to enumerate the set to retrieve property information about each user to populate fields or filter the set.

Members

The ICredentialProviderUserArray interface inherits from the IUnknown interface. ICredentialProviderUserArray also has these types of members:

Methods

The ICredentialProviderUserArray interface has these methods.

MethodDescription
GetAccountOptions

Retrieves a value that indicates whether the "Other user" tile for local or Microsoft accounts is shown in the logon or credential UI. This information can be used by a credential provider to show the same behavior as the password or Microsoft account provider.

GetAt

Retrieves a specified user from the array.

GetCount

Retrieves the number of ICredentialProviderUser objects in the user array.

SetProviderFilter

Limits the set of users in the array to either local accounts or Microsoft accounts.

 

Remarks

This object is provided by the Windows credential provider framework to your credential provider through the ICredentialProviderSetUserArray::SetUserArray method. Ownership of this object remains with the credential provider framework.

When to implement

Third-parties do not implement this interface. An implementation is included with Windows.

Examples

The following example demonstrates a scenario that uses some of the methods of this interface. The pcpua variable represents a previously declared ICredentialProviderUserArray object.



DWORD dwCount = 0;

HRESULT hr = pcpua->GetCount(&dwCount);

if (SUCCEEDED(hr))
{
    for (DWORD i = 0; i < dwCount; i++)
    {
        ICredentialProviderUser *pcpu = NULL;
        hr = pcpua->GetAt(i, &pcpu);

        if (SUCCEEDED(hr))
        {
            PWSTR pszName = NULL;
            hr = pcpu->GetStringValue(PKEY_Identity_UserName, &pszName);

            if (SUCCEEDED(hr))
            {
                // Do something with the string
                CoTaskMemFree(pszName);
            }
            pcpu->Release();
        }
    }
}

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

CredentialProvider.h

IDL

CredentialProvider.idl

Library

CredentialProvider.lib

DLL

Authui.dll

See also

ICredentialProviderSetUserArray
ICredentialProviderUser
Credential Provider Framework Changes in Windows 8.docx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft