(PyUnicode, PyUnicode, boolean) = CredUICmdLinePromptForCredentials(TargetName, AuthError , UserName , Password , Save , Flags )

Prompt for username/passwd from a console app


TargetName : PyUnicode

Server or domain against which to authenticate

AuthError=0 : int

Error code indicating why credentials are required, can be 0

UserName=None : PyUnicode

Default username, can be None. At most CREDUI_MAX_USERNAME_LENGTH chars

Password=None : PyUnicode

Password, can be None. At most CREDUI_MAX_PASSWORD_LENGTH chars

Save=True : boolean

Specifies default value for Save prompt


Combination of CREDUI_FLAGS_* values


The command-line version of this function does not accept certificates, so Flags must contain CREDUI_FLAGS_EXCLUDE_CERTIFICATES or CREDUI_FLAGS_REQUIRE_SMARTCARD

Return Value

Returns the username and password entered, and a boolean indicating if credential was saved