initiates a standard dialog for entering username/password authentication information.


initiates an authentication dialog of the specified standard type.

AuthenticationDialog[{"key1","key2", }]

initiates an authentication dialog that requests values for the specified keys.


applies the function func to the dialog's return value.

Details and Options


open allclose all

Basic Examples  (4)

Request a username and password:

Request just a password:

Request just a password and automatically process the result:

Request secured authentication credentials:

Scope  (7)

Provide initial values for some of the dialog fields:

Specify a function to process the resulting Association:

Use custom key names, specifying optional initial values and masking:

Use SystemCredentialKey"name" to securely store the dialog fields between sessions. The data is stored under the provided name:

The data is remembered in secure storage under the given name:

Use FormObject for other control types, optional fields, and so on:

Use AuthenticationDialog in a standalone Wolfram Language kernel:

$ ./WolframKernel
Mathematica 11.3.0 Kernel for Mac OS X x86 (64-bit)
Copyright 1988-2017 Wolfram Research, Inc.

In[1]:= AuthenticationDialog[]
Username: matt
Password: *****

Out[1]= <|Username -> matt, Password -> 12345|>

Use AuthenticationDialog in wolframscript:

$ wolframscript -code "AuthenticationDialog[]"
Username: matt
Password: *****
<|Username -> matt, Password -> 12345|>


Generalizations & Extensions  (1)

The "UsernamePassword" AuthenticationDialog has an additional feature if used with the SystemCredentialKey option. The fields are stored for each username previously provided:

A new instance of the dialog is automatically filled with the last-used credentials. The password field is automatically filled after selecting an entry from the drop-down menu:

The entries for all usernames are stored in secure storage with names derived from the base name:

Options  (7)

AppearanceRules  (3)

Include descriptive text in the dialog:

Specify a title and a description:

Change the text on the submit button:

SystemCredentialKey  (2)

Use SystemCredentialKey to securely store the dialog fields between sessions:

Recall the stored field values by using the same domain as before:

WindowMargins  (1)

Position the dialog at the upper-left corner of the main display:

WindowTitle  (1)

Use WindowTitle and other notebook options to adjust aspects of the dialog's notebook window:

Properties & Relations  (2)

Use AuthenticationDialog as a setting for Authentication, to prompt for credentials when needed:

Use AuthenticationDialog to request a password for other functions, like Encrypt and Decrypt:

Possible Issues  (5)

Preemptive controls cannot block the kernel's evaluation queue:

Always call AuthenticationDialog from a queued evaluation:

AuthenticationDialog blocks the kernel's evaluation queue, preventing asynchronous dynamics from rendering:

Only synchronous dynamics will render while the kernel's evaluation queue is blocked:

AuthenticationDialog will use any stored credentials that match the dialog's keys for the given domain:

If another unrelated authentication dialog uses the same SystemCredentialKey, its old values will be overwritten:

SystemCredentialKey is ignored for any AuthenticationDialog that uses a FormObject:

SystemCredentialKey is ignored for any AuthenticationDialog in a standalone Wolfram Language kernel:

> wolfram
Mathematica 12.1.0 Kernel for Microsoft Windows (64-bit)
Copyright 1988-2020 Wolfram Research, Inc.

In[1]:= AuthenticationDialog["Password", SystemCredentialKey->"Domain"] Password: *** Out[1]= <|Password -> 123|>
Wolfram Research (2018), AuthenticationDialog, Wolfram Language function, (updated 2020).


Wolfram Research (2018), AuthenticationDialog, Wolfram Language function, (updated 2020).


Wolfram Language. 2018. "AuthenticationDialog." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020.


Wolfram Language. (2018). AuthenticationDialog. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2022_authenticationdialog, author="Wolfram Research", title="{AuthenticationDialog}", year="2020", howpublished="\url{}", note=[Accessed: 20-March-2023 ]}


@online{reference.wolfram_2022_authenticationdialog, organization={Wolfram Research}, title={AuthenticationDialog}, year={2020}, url={}, note=[Accessed: 20-March-2023 ]}