Microsoft Lync and Skype for Business have a rich set of .NET APIs which make it easy to extend the platform and integrate it with other applications. This blog helps explain how to use those APIs.

Getting a list of a user’s conferences

Posted: April 10th, 2012 | Author: | Filed under: UCMA 3.0 | Tags: | 3 Comments »

I wanted to share an approach for getting details on an individual user’s conferences that I think many people may not be aware of. You may know that you can have a UCMA application schedule a conference programmatically through the ConferenceServices object, which you can access via a property on your UserEndpoint or ApplicationEndpoint. In my experience, the ConferenceServices class is used almost exclusively for scheduling conferences, and you may not be aware that you can also use it to find the URIs or IDs of conferences that a user has created.

The first step to doing this is to create and establish a UserEndpoint for the user whose conferences you want to look up. An endpoint in UCMA can only get information on its own conferences (i.e., conferences that the user it represents has scheduled), so unfortunately you can’t just use a single ApplicationEndpoint to get a master list of all scheduled conferences. (I was a little disappointed.) One important point to note is that conferences that were scheduled before your UserEndpoint was established are still fair game. Any conference that hasn’t expired that belongs to the user will show up, regardless of when it was created.

Once the endpoint is established, the code to look up conference information is pretty simple and looks generally like the following:

_endpoint.ConferenceServices.BeginGetConferenceSummaries(
    result =>
    {
        try
        {
            Collection<ConferenceSummary> summaries =
                _endpoint.ConferenceServices.EndGetConferenceSummaries(result);

            foreach (ConferenceSummary summary in summaries)
            {
                Console.WriteLine("Conference ID {0} about {1} with URI {2} and access level {3}",
                    summary.ConferenceId, summary.Subject, summary.ConferenceUri,
                    summary.AccessLevel);
            }
        }
        catch (RealTimeException ex)
        {
            Console.WriteLine(ex);
        }
    },
    null);

Those ConferenceSummary objects you can see in the code give you the basic details on each conference that belongs to the user. Much of the time, the list you get back will only contain a single conference, because the Outlook meeting add-in reuses a single conference ID for online meetings scheduled by the same user. But you may see more than one if the user has created ad hoc conferences (through the Meet Now option in the Lync client, or by inviting other people to a two-party conversation, for example). If you do this for an ApplicationEndpoint that creates lots of conferences, you could potentially have a much longer list.

Once you have conference URIs, you can use them to join the listed conferences if you like. You can either join on behalf of the user, or join as a trusted participant using an ApplicationEndpoint to provide a service of some kind (such as announcements) to the conference.


3 Comments on “Getting a list of a user’s conferences”

  1. 1 Lync Blog » Blog Archive » Getting a list of a user's conferences | Lync Development said at 4:23 am on April 13th, 2012:

    […] Getting a list of a user's conferences | Lync Development document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E")); try {Histats.start(1,1591082,4,0,0,0,""); Histats.track_hits();} catch(err){}; Posted: April 10th, 2012 | Author: Michael | Filed under: UCMA 3.0 | Tags: conference | No Comments ยป […]

  2. 2 Eric Padelford said at 8:43 am on December 1st, 2015:

    Is there a way to get the user conference id for all users in an organization through script?

    The value I am looking for is this one:

    Conference ID: 90127

    That appears in the lync meeting invitation

  3. 3 Eric P said at 10:24 am on March 22nd, 2016:

    Do you have the rest of the code for this example?


Leave a Reply

  • Note: Comment moderation is in use because of excessive spam. Your comment may not appear immediately.

  •