1

My .NET (WPF and C#) application succesfully integrates with a local Lotus Notes client via Interop.Domino. It prompts the user for his Lotus Notes username/password (which are really the windows credentials) and then creates a mail in the user's local Lotus Notes mailbox. I use the code below, and it works fine (the part that creates the email is not included). However, the customer would like it to work automatically, without the user being prompted for his password. The Lotus Notes installation uses Windows credentials, but my application does not. Users are not prompted for password when they manually open their Lotus Notes, so I figure it should be possible.

How can I open a session with Notes and tell it to just use whatever windows credentials of the user logged into Windows?

        NotesSession notesSession = new NotesSession();
        notesSession.Initialize();

        // An empty servername means we go to the locally installed Lotus Notes
        string serverName = String.Empty;
        NotesDbDirectory directory = notesSession.GetDbDirectory(serverName);

        NotesDatabase notesDatabase = directory.OpenMailDatabase();

        if (!notesDatabase.IsOpen)
        {
            notesDatabase.Open();
        }
Torben Junker Kjær
  • 4,042
  • 4
  • 34
  • 33

1 Answers1

1

You can tell Notes not to prompt for password when other Notes-based programs access Notes data (while Notes is running).

See http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.notes85.help.doc/sec_pass_otherapps_t.html for details

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
  • 1
    Per Henrik's answer is correct, however he is referring a global setting that lets all programs written with the Notes APIs access the Notes client without prompting for a password. If your customer considers this an unacceptable security risk but still wants to avoid the password prompt for your code, then you are going to have to investigate the Notes C API's Extension Mangager functions. There is very basic sample code for this in the Notes C API Toolkit, but you will have to implement a secure protocol of your own to identify your code and provide the Notes password. – Richard Schwartz Jan 09 '13 at 22:28
  • I should add that since you mentioned that the customer has integrated Windows and Notes logons, I'm not 100% sure whether using the Extension Manager functions will work. The GetPasswordEMCallback requires that you return the Notes ID password, but in the most recent versions of Notes/Windows login integration (called "Notes Shared Login" vs the older "Notes Single Login", I believe that neither the user nor the administrator actually knows the Notes ID password as it is derived from the Windows credentials. – Richard Schwartz Jan 09 '13 at 22:34