/// <summary> /// Raised when user's credentials are rejected by Lync or a service that /// Lync depends on requests credentials /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the request for credentials comes from Lync server then sign out, get new creentials //and sign in. if (e.Type == CredentialRequestedType.LyncAutodiscover) { try { _LyncClient.BeginSignOut((ar) => { _LyncClient.EndSignOut(ar); //Ask user for credentials and attempt to sign in again SignUserIn(); }, null); } catch (Exception ex) { if (SetWindowCursor != null) { SetWindowCursor(Cursors.Arrow); } MessageBox.Show( "Exception on attempt to sign in, abandoning sign in: " + ex.Message, "Lync Client sign in delay", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { e.Submit(Constants.ID, Constants.PASSWORD, false); } }
//CredentialRequested event handler private void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { if (e.Type == CredentialRequestedType.SignIn) { //You should collect a new password here. e.Submit(ConfigurationManager.AppSettings["UserDomainAndUserName"], "yourPassword", false); } }
void _client_CredentialRequested(object sender, CredentialRequestedEventArgs e) { switch (e.Type) { case CredentialRequestedType.SignIn: e.Submit(e.UserName, Password, false); break; default: throw new ArgumentOutOfRangeException("e.Type", e.Type, "Unknown credential type"); } }
void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { if (e.Type == CredentialRequestedType.SignIn) { using (CredentialForm _CredentialForm = new CredentialForm()) { _CredentialForm.ShowDialog(); if (_CredentialForm.DialogResult == true) { e.Submit( _CredentialForm.userDomain, _CredentialForm.userPassword, false); } } } }
/// <summary> /// Raised when user's credentials are rejected by Lync or a service that /// Lync depends on requests credentials /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the request for credentials comes from Lync server then sign out, get new creentials //and sign in. if (e.Type == CredentialRequestedType.LyncAutodiscover) { try { _LyncClient.BeginSignOut((ar) => { _LyncClient.EndSignOut(ar); //Ask user for credentials and attempt to sign in again SignUserIn(); }, null); } catch (Exception ex) { if (SetWindowCursor != null) { SetWindowCursor(Cursors.Arrow); } MessageBox.Show( "Exception on attempt to sign in, abandoning sign in: " + ex.Message, "Lync Client sign in delay", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { SignInCreds getCreds; getCreds = new SignInCreds(e.Type.ToString()); if (getCreds.ShowDialog() == DialogResult.OK) { string userUri = getCreds.UserName; string userPassword = getCreds.Password; getCreds.Close(); e.Submit(userUri, userPassword, false); } } }
private void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the request for credentials comes from Lync server then sign out, get new creentials //and sign in. if (e.Type == CredentialRequestedType.LyncAutodiscover) { try { _retries = _retries + 1; if ((_retries < 10)) { _lyncClient.BeginSignOut(ar => { _lyncClient.EndSignOut(ar); //Ask user for credentials and attempt to sign in again SignUserIn(); }, null); } else { _lyncClient.BeginSignOut(ar => { _lyncClient.EndSignOut(ar); _signInProcedureEvent.Set(); }, null); } } catch (Exception ex) { Trace.WriteLine($"Exception on attempt to sign in, abandoning sign in: {ex.Message}, Lync Client sign in delay"); } } else { e.Submit(_username, _password, false); } }
/// <summary> /// Raised when user's credentials are rejected by Lync or a service that /// Lync depends on requests credentials /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnLyncClientCredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the request for credentials comes from Lync server then sign out, get new creentials //and sign in. if (e.Type == CredentialRequestedType.LyncAutodiscover) { try { _lyncClient.BeginSignOut((ar) => { _lyncClient.EndSignOut(ar); //Ask user for credentials and attempt to sign in again SignUserIn(); }, null); } catch (Exception ex) { _log.ErrorException("OnLyncClientCredentialRequested", ex); } } else { } }
void lyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { Log("Credential Requested event is raised, calling Submit()"); e.Submit(@"consoto\user1", "wewa1", e.IsPasswordSaved); Log("Submitted credential to complete sign in"); }
void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { }
private void Client_CredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the server type is Lync server and sign in credentials //are needed. if (e.Type == CredentialRequestedType.SignIn) { //Re-submit sign in credentials e.Submit("<provide user>", "<provide password>", true); } }
/// <summary> /// Raised when user's credentials are rejected by Lync or a service that /// Lync depends on requests credentials /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void _LyncClient_CredentialRequested(object sender, CredentialRequestedEventArgs e) { //If the request for credentials comes from Lync server then sign out, get new creentials //and sign in. if (e.Type == CredentialRequestedType.LyncAutodiscover) { try { _LyncClient.BeginSignOut((ar) => { _LyncClient.EndSignOut(ar); //Ask user for credentials and attempt to sign in again SignUserIn(); }, null); } catch (Exception ex) { if (SetWindowCursor != null) { SetWindowCursor(Cursors.Arrow); } MessageBox.Show( "Exception on attempt to sign in, abandoning sign in: " + ex.Message, "Lync Client sign in delay", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { e.Submit(Constants.ID, Constants.PASSWORD, false); } }