When submitting a job to a Microsoft HPC Server by using the HPC's API, a job is submitted by calling the SubmitJob function:
void SubmitJob (ISchedulerJob job, string username, string password);
If the username is null, the system uses the Windows' username, if the password is null, the system searches for a cached password.
If there isn't a cached password (or the cached password is incorrect), the system prompt a console screen that requests the user's password (until the correct password has been entered).
I want to avoid this screen, instead I would like to check if the user has a correct cached password, otherwise present my own dialog instead of the default console screen.
The problem is that so far I was unable to find a way to do so, IScheduler
has a method called GetUserPrivileges()
which tell you if the user has No Access \ User \ Admin
privileges on the server. But it would return User
for any existing username on the server, nevermind if a cached password exists.
Is it possible to check before submitting a job if a user has a correct cached password, and if not, request a password? or perhaps replacing the default request password console with my own custom dialog?