ICredentialProviderUserArray::SetProviderFilter method (credentialprovider.h)

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

Syntax

HRESULT SetProviderFilter(
  REFGUID guidProviderToFilterTo
);

Parameters

guidProviderToFilterTo

Set this parameter to Identity_LocalUserProvider for the local accounts credential provider; otherwise set it to the GUID of the Microsoft account provider.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The ICredentialProviderUserArray object contains all of the available users in the current scenario. This method enables your credential provider to specify a particular subset of those users. For example, if your credential provider handles only Microsoft account users from a specific connected provider, it can call this method with the Microsoft account provider's ID to filter out users that belong to other providers.

This method can only be called once, to filter for a single account provider. If the method is called again, the call will fail with a return value of E_UNEXPECTED.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header credentialprovider.h
Library CredentialProvider.lib
DLL Authui.dll

See also

ICredentialProviderUser::GetProviderID

ICredentialProviderUserArray