CredentialPicker.PickAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PickAsync(CredentialPickerOptions) |
Displays a dialog box to the user and collects credentials from the user. |
PickAsync(String, String) |
Constructor used to initiate asynchronous prompting operations using two inputs. |
PickAsync(String, String, String) |
Constructor used to initiate asynchronous prompting operations using three inputs. |
PickAsync(CredentialPickerOptions)
Displays a dialog box to the user and collects credentials from the user.
public:
static IAsyncOperation<CredentialPickerResults ^> ^ PickAsync(CredentialPickerOptions ^ options);
/// [Windows.Foundation.Metadata.Overload("PickWithOptionsAsync")]
static IAsyncOperation<CredentialPickerResults> PickAsync(CredentialPickerOptions const& options);
[Windows.Foundation.Metadata.Overload("PickWithOptionsAsync")]
public static IAsyncOperation<CredentialPickerResults> PickAsync(CredentialPickerOptions options);
function pickAsync(options)
Public Shared Function PickAsync (options As CredentialPickerOptions) As IAsyncOperation(Of CredentialPickerResults)
Parameters
- options
- CredentialPickerOptions
The options on displaying and collecting the credential box.
Note
In a non-UWP (that is, desktop) app, the CredentialPickerOptions.Caption must be set.
Returns
The credential and options from the user.
- Attributes
See also
Applies to
PickAsync(String, String)
Constructor used to initiate asynchronous prompting operations using two inputs.
public:
static IAsyncOperation<CredentialPickerResults ^> ^ PickAsync(Platform::String ^ targetName, Platform::String ^ message);
/// [Windows.Foundation.Metadata.Overload("PickWithMessageAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<CredentialPickerResults> PickAsync(winrt::hstring const& targetName, winrt::hstring const& message);
[Windows.Foundation.Metadata.Overload("PickWithMessageAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<CredentialPickerResults> PickAsync(string targetName, string message);
function pickAsync(targetName, message)
Public Shared Function PickAsync (targetName As String, message As String) As IAsyncOperation(Of CredentialPickerResults)
Parameters
- targetName
-
String
Platform::String
winrt::hstring
The target name to display.
- message
-
String
Platform::String
winrt::hstring
The message to display in the dialog box.
Returns
The credential and options from the user.
- Attributes
Remarks
This method is supported only in UWP apps. In a non-UWP (that is, desktop) app, use the three-parameter overload, and set the caption parameter.
See also
Applies to
PickAsync(String, String, String)
Constructor used to initiate asynchronous prompting operations using three inputs.
public:
static IAsyncOperation<CredentialPickerResults ^> ^ PickAsync(Platform::String ^ targetName, Platform::String ^ message, Platform::String ^ caption);
/// [Windows.Foundation.Metadata.Overload("PickWithCaptionAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<CredentialPickerResults> PickAsync(winrt::hstring const& targetName, winrt::hstring const& message, winrt::hstring const& caption);
[Windows.Foundation.Metadata.Overload("PickWithCaptionAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<CredentialPickerResults> PickAsync(string targetName, string message, string caption);
function pickAsync(targetName, message, caption)
Public Shared Function PickAsync (targetName As String, message As String, caption As String) As IAsyncOperation(Of CredentialPickerResults)
Parameters
- targetName
-
String
Platform::String
winrt::hstring
The target name to display.
- message
-
String
Platform::String
winrt::hstring
The message to display in the dialog box.
- caption
-
String
Platform::String
winrt::hstring
The caption to display in the dialog box.
Note
This value must be set for a non-UWP (that is, desktop) app.
Returns
The credential and options from the user.
- Attributes