Pages Menu

Posted by on Mar 4, 2013 in Development, Skype for Business® (Lync®) | 5 comments

Creating UCMA Applications with a UserApplication instance. Example: sending IMs.

Creating UCMA Applications with a UserApplication instance. Example: sending IMs.

The UCMA platform is very powerful, but sometimes you just want to send a message. Of course, you can do this using the Lync Client SDK, but you might not want the obvious interaction with the Lync client and visibility that provides. If you’re writing a Windows .NET application, you might just want to perform a Lync activity within the code, silently and secretly 🙂

When you write UCMA code you choose whether to do so with UserEndpoints or with ApplicationEndpoints. UserEndpoints are tied to a specific user, a Lync account and must have a username and password. ApplicationEndpoints have to be pre-registered with the Lync Server like this and are generally more powerful than UserEndpoints.

However, if all you want to do is send a quick IM and you’re in an application that already has the user’s credentials (or you can re-prompt for them), then a UserEndpoint is fine.

Here’s a quick example showing how to do this. This code will create and establish a UserEndpoint, send an IM and then Terminate:


  1. Thank you for posting this code. I needed an alternative to using the Lync SDK to send an instant message. This code put me on the track to use SIP instea.

  2. Hello. I’ve repeated as you posts now, but I met the error {ErrorCode=4005,Source=MyServer.COM,Reason=Destination URI either not enabled for SIP or does not exist Microsoft.Rtc.Signaling.DiagnosticHeader}. Maybe user account problem? With Lync 2010 client, it has no error. Would you please tell me that there is any setting with user?

  3. Hi,
    great job, i’m new with Lync Developing but your blog got me far ahead in the learning process.

    is it possible to use UCMA SDK to create user or application endpoint that listen to incoming IM calls? without having to initiate the IM call from the UCMA application first?

    appreciate your help 🙂

  4. Hi
    Thank you for posting this code.
    I’ve done your code, but I met the error:
    error message : Unable to establish a connection.
    InnerException error message : No connection could be made because the target machine actively refused it

  5. Hi,
    Thanks for great information.!! I need code sample of IM for Application Endpoints.

    Please provide what changes i have do in above sample.



  1. Creating UCMA Applications with a UserApplication instance. Example: sending IMs. thoughtstuff | Tom Morgan | Lync News - [...] | Tom Morgan [...]

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site uses cookies to help make this website better. By continuing to use this site we’ll assume you’re OK with that (implied consent).