cancel
Showing results for 
Search instead for 
Did you mean: 

Login Agent - Unlock Screen doesn't work

PatriciaSwain
Level 2

I was reviewing the BluePrism object that is supposed to unlock a VW AD session.  However, the unlock just executes the same page as the login code which includes LOGON and writing domain/username, which isn't necessary, so it's failing.  I think I need to update the code to use the existing Pipe Client (whatever that is) instead of creating a new one, and then change the WriteString command to only send the password.  Can someone provide the correct code or point me in the right direction?


Current "Authenticate To Windows" code:

Try

                'Create a new pipe client

                Using pipeClient As New NamedPipeClientStream(

                                ".",

                                "BluePrismCredentialProviderPipe",

                                PipeDirection.InOut,

                                PipeOptions.None,

                                TokenImpersonationLevel.Impersonation)

 

                                'Attempt to connect to it

                                pipeClient.Connect(10000)

 

                                'Send credentials

                                Dim dom As String

                                If Local Then

                                                dom = Environment.MachineName

                                Else If Domain = "" Then

                                                dom = Environment.UserDomainName

                                Else

                                                dom = Domain

                                End If

                                Dim ss As New StreamString(pipeClient)

                                ss.WriteString(String.Format("LOGON{0}{1}{0}{2}{0}{3}", vbLf, dom, Username, Password))

 

                                'Wait for reply

                                Using pr As New StreamReader(pipeClient, Encoding.Unicode)

                                                Response = pr.ReadLine()

                                                If Response = "OK" OrElse Response = "UNKNOWN" Then Return

 

                                                ErrorCode = pr.ReadLine()

                                                ErrorMessage = pr.ReadLine()

                                End Using

                End Using

Catch ex As Exception

                Response = "ERROR"

                ErrorCode = ""

                ErrorMessage = ex.Message

End Try

1 REPLY 1

expertcr
Staff
Staff
The login agent process only has 4 actions: Change Password, Check Logged In, Login and Logout.
36174.png
It is a requirement to disable the CTRL + ALT + DEL
Please review the following KB Article: How do I configure Login Agent Group Policy settings?