0

I have problem getting all contact endpoints using the Lync API. Here's my code:

static void Main(string[] args)
{
  LyncClient client = LyncClient.GetClient();
  var endpoints = (List<object>)client.Self.Contact.GetContactInformation(ContactInformationType.ContactEndpoints);
}

Here's my Lync setup:

enter image description here

However when I debug, I only get two endpoints:

enter image description here

Is this a bug in the API? Or am I missing anything?

Morten Frederiksen
  • 5,114
  • 1
  • 40
  • 72

1 Answers1

0

Per the answer to this question: Lync - inconsistent behavior with ContactEndpoints

You may find that this answer from Microsoft is the answer to your issue as well:

The behavior you are seeing is due to presence subscription optimization to the Lync client so that the subscription is delayed until the necessary contact information is required by the Lync client. Photo is an example for this optimization. Another example is ContactEndpoints. Please take a look at Contact presence subscription changes section of the Migration doc for Lync 2013 page in MSDN docs. Specifically you must create and maintain your own ContactSubscription for the contacts that you need all the ContactEndpoints.

Community
  • 1
  • 1
Steve Lillis
  • 3,263
  • 5
  • 22
  • 41
  • I am aware of this (I guess this was a change for the Lync 2013 API). In the examples explaining this - Presence information is shown. I do not believe that this is the root cause for not getting all of my own endpoints. And this is for the Self contact. – Morten Frederiksen Feb 04 '15 at 15:20
  • Did you try writing your own ContactSubscription for Self just to be sure? – Steve Lillis Feb 05 '15 at 09:37
  • There is no ContactSubscription method on Self, there is a BeginPublishContactInformation method - is that the one? – Morten Frederiksen Feb 05 '15 at 11:20