win32cred.CredUIPromptForCredentials

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

Initiates dialog to request user credentials

Parameters

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 whether Save checkbox defaults to checked or unchecked

Flags=0 : int

Combination of CREDUI_FLAGS_* values

UiInfo=None : dict

PyCREDUI_INFO dict for customizing the dialog, can be None

Return Value

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