MultiotpCPV2RDP icon indicating copy to clipboard operation
MultiotpCPV2RDP copied to clipboard

_pszQualifiedUserName is giving null for cached users.

Open Mohitkiran opened this issue 4 years ago • 9 comments

Hi, this project regarding credential provider is really great I have took this project as reference and I have been developing a new credential provider so my problem is some times _pszQualifiedUserName is being returning null in getSerialization method for cached user tiles(user tiles that are displayed on left bottom corner of login UI) when trying to login, how ever if I am trying to login from other user tile every thing is working fine. I am really stuck at this point can you please help me out and point me in the right direction, please let me know if you need to see the code snippet of getSerialization method. Thank you!

Mohitkiran avatar Oct 09 '19 14:10 Mohitkiran

Set #define DEVELOPING TRUE and check the log file - look for "no pcpUser!!!" or "_pszQualifiedUserName: " or uncomment //if (DEVELOPING) PrintLn(L"Field altered, fieldID: %d", dwFieldID);

arcadejust avatar Oct 10 '19 22:10 arcadejust

Yeah I checked the log and _pszQualifiedUserName is null in log and this null is not coming always but very randomly (Only for cached user tiles it is happening and not when logged from other user). I am new to this windows area and if you think you need to see the code I can attach the file.

Mohitkiran avatar Oct 11 '19 15:10 Mohitkiran

Can you make a new commit in your branch and I will check it. You can make this branch private if you don't want others to see it.

arcadejust avatar Oct 11 '19 16:10 arcadejust

I got where I was doing wrong I didn't specify _fUserNameVisible(false) in userCrendential.cpp constructor so the thread is entering into if(_fUserNameVisible) and then _pszQualifiedUserName memory is getting cleared in that if and later it is returning null. Thanks for taking time to reply @arcadejust .

Mohitkiran avatar Oct 16 '19 07:10 Mohitkiran

Can you tell me when does the control enter if(_fLocalUser) and when does it enter into else? My observation is that only for microsoft account login it is going into else block of if(_fLocalUser) and for every other (Local and Domain) accounts the control is going into if(_fLocalUser) Is my observation right?

Mohitkiran avatar Oct 16 '19 14:10 Mohitkiran

Only domain user that has locally stored account after previous logon. Not for domain user that never logged on this PC. It was important for me to detect login from full name because they are stored in the same field (that's how I remember this - you have to double check on this info). Also there were backward compatibility issues for credential provider V1 - so without installing all the virtual machines and debugging I cannot tell for sure why it was needed. I remember there were different scenarios between win 8.0 and win 8.1 and win 10.

arcadejust avatar Oct 16 '19 18:10 arcadejust

Okay thanks and one more thing is I tried adding the machine to azure ad and installed the credential provider and what happens is it is not displaying the credential provider in sign in options for other user tile and displays for all cached user tiles sign in options where as it is showing on other user tile sign in options and for cached user tiles sign in options as well, when joined to local domain. Any thoughts?

Mohitkiran avatar Oct 21 '19 11:10 Mohitkiran

I never tested azure domain, sorry:/

arcadejust avatar Oct 21 '19 18:10 arcadejust

No problem, Thank you for sparing time to reply me!

Mohitkiran avatar Oct 22 '19 14:10 Mohitkiran