The Office Communicator Automation API in 2 min.

What is it?

The Office Communicator Automation API provides programmatic access to Office Communicator 2007 R2 so you can automate Office Communicator 2007 R2 running on the client computer.

The Office Communicator Automation API is a quick and easy way to integrate Office Communicator functionality into your applications.


What does it do?

With the Office Communicator Automation API, you can add presence and communication features to any client application, including:

  1. Embed Presence with Application Specific Contact Lists – use the API to build contact lists specific to an application and show Office Communicator presence for those contacts.
  2. Launch Communications – add IM, voice and video communications directly in an application to allow users to communicate and collaborate directly from the application.
  3. Application Context Specific Communication – use the API to integrate data from the application into conversations the application launches to provide application specific context for the conversation.


What do I need to know?

The API automates Office Communicator running on the client machine allowing you to create sophisticated presence and communication features with minimal code. 


The API works with either Office Communicator 2007 or Office Communicator 2007 R2. 


Office Communicator must be deployed on each client in order for your Office Communicator Automation API code to run.


The API provides two COM libraries:

  • Communicator.dll – provides classes and interfaces for automating Office Communicator.  Classes and interfaces in this library often cause Office Communicator to show dialogs.  For example, when calling the method to add a contact to the Office Communicator contact list from this library, the “Add Contact” dialog is shown.
  • CommunicatorPriv.dll – provides classes and interfaces for automating Office Communicator.  Classes and intefaces in this library will never show Office Communicator dialogs.  For example, calling the method to add a contact to the contact list using this library won’t show the “Add Contact” dialog.


Since the API is based on the COM platform, you’ll need to treat instances of classes and interfaces as unmanaged resources and release them when you’re done to avoid resource issues such as memory leaks.


What do I need?

  1. Office Communications Server 2007 (or later).
  2. Office Communicator 2007 (or later).
  3. Office Communicator 2007 SDK.
  4. Visual Studio 2005 (or later).

Where can I get it?

The Office Communicator Automation API ships in the Microsoft Office Communicator 2007 SDK along with samples and documentation.

Comments (11)

  1. Allyson Kreft says:

    Can you use the Communicator Automation API with ASP.NET?

    I created 2 VS2008 projects with the same code (just creates a _communicator object = new Messenger()). One project is a WPF app and the other ASP.NET. The WPF works fine but the ASP.NET keeps returning COM errors. Both are being run on a DC with OCS 2007, CWA, and a Communicator client.

  2. Chris says:

    No, the OC Automation API is for client side development.

    Look at the UCMA 2.0 API for creating client gateways for server side scenarios such as ASP.NET.



  3. Thomas Beneke says:

    Have you ever reached to get the phonenumber of an incomming call? I’ve spent a lot of time on this task, but I struggle with that. I want to show an adressform in our businessapplication of the incomming caller, related to the phonenumber.

  4. Mark Irwin says:

    "use the API to build contact lists specific to an application", do you mean that you can programmatically create a list of contacts that do not appear in the Communicator users’s contact list within Communicator?  I haven’t found a way to do this.  You can create a new group, but it still appears in the user’s contact list in Communicator.

    I’ve also found that I often get stale presence from the Communicator Automation API for contacts who are not in the user’s contact list.

  5. Thomas,

    You can do this with the UCCA API.  See the following sample:

    Let me know if you have questions.


  6. Mark,

    Yes, you can create a contact list that included contacts that are not in the local users contact list.  

    You will get stale presence when using the OC Automation API.

    To get around this, add the contact to the contact list under an application specific group.



  7. David Levine says:


    I stumbled on your posting as a result of a response to a post to an MSDN forum.  We’re using the UCC API to build our own client that integrates w/ OCS and discovered that presence is not correctly propagated to Sharepoint and Outlook (i.e., with our client).  

    One person indicated that this was only possible if one uses the OCS Automation API.  Would you be able to confirm/deny and if not the case would you be able to point us to any relevant references.  IMHO: It would seem odd if this were true.



  8. cmayo says:


    A UCCA app is able to publish presence that is consumed by the name.dll (the ActiveX control that is used by Office/SharePoint 2010 to show presence).  There could be an issue with the way you’re publishing presence.

    I would check presence being publshed by OC 2007 R2 in your environment.  If presence is being consumed correctly the issue is most likely in your UCCA code.

    Hope that helps.


  9. Paulo says:

    You know how I can use the signin method in API Communicator?

    I'm trying this way but could not succeed.

    mCommunicator = new CommunicatorAPI.Messenger();

    if (mCommunicator.MyStatus == CommunicatorAPI.MISTATUS.MISTATUS_OFFLINE)

       mCommunicator.Signin(0, @"", "mypassword");

  10. Yogendra Kumar says:

    Hi Chris,

    Is there a way to check user status from Globally Contact List rather than my contact list. Don't want add a user but if we can find a way to send anyone’s email to check his Status(how we do it in our communicator). Currently it run only for people who are in my contact list.

    I want to pass list of emailIDs  and get status . These contacts doesn't need to be in my contact list .

    Any idea/sample code on how to do that.