none
Book Lync/Online Meeting using EWS RRS feed

  • Question

  • Hi,

    We are trying to implement what we thought was a simple task, namely to book an Online Meeting via Exchange Web Services (EWS). However, it turned out not to be as easy as we thought.

    We want the exact same functionality as when you click the 'New Lync Meeting' in Outlook.

    For Exchange 2013/Exchange Online, we hoped it was as easy as this:

    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013); service.Credentials = new WebCredentials("userName", "password", "domain"); service.Url = new Uri(ewsUrl); Appointment appointment = new Appointment(service); appointment.Subject = "Subject"; appointment.Location = "Lync"; appointment.Body = "A description..."; appointment.Start = DateTime.Now.AddHours(1); appointment.End = DateTime.Now.AddHours(2);

    //Flag that this is an online meeting
    appointment.IsOnlineMeeting = true;

    //Add some attendees appointment.RequiredAttendees.Add("test1@test.com"); appointment.RequiredAttendees.Add("test2@test.com"); //Then, save and send appointment.Save(WellKnownFolderName.Calendar, SendInvitationsMode.SendOnlyToAll); //Finally, load the properties to view JoinOnlineMeetingUrl List<Item> items = new List<Item>(); items.Add(appointment); service.LoadPropertiesForItems(items, PropertySet.FirstClassProperties);

    The problem is that even though we set appointment.IsOnlineMeeting = true, the JoinOnlineMeetingUrl is null and the calendar item in my or the attendees' Outlook does not contain the 'Join Lync Meeting' button that indicates that this is an online Lync meeting.

    Suggestions anyone?

    Ideally we would like to achive the same thing with Exchange 2010 since our customer is currently running on Exchange 2010 (but they have a migration roadmap to Exhange 2013 or Exchange Online some time during 2014).

    Regards,
    Eivind


    • Edited by Eivind L Saturday, November 16, 2013 10:55 PM
    Friday, November 15, 2013 9:44 PM

All replies

  • Hi Eivind,

    looks to me like you are missing some properties on the Appointment Item, given your description. The problem however, is that I have no experience whatsoever with Lync, so I can't tell you which they are.

    But: There may be a way for you to find out which those are:
    Grab your friendly MAPI viewer and check out what properties a 'correct' appointment has, then try setting them as necessary using extended properties.

    Cheers,
    Fred

    P.s.: I can't see where in your code example you are setting appointment.IsOnlineMeeting = true :)


    There's no place like 127.0.0.1

    Saturday, November 16, 2013 6:50 PM
  • EWS/Exchange won't generate a joinable Lync Meeting URL you need to use a Lync API for this eg http://msdn.microsoft.com/en-us/library/office/hh364917(v=office.14).aspx . Then you'll need to set the extended properties associated with the meeting (generated through the Lync API) using the SetExtendedProperty methods. 

    Cheers
    Glen

    Monday, November 18, 2013 5:06 AM
  • Hi Eivind

    Did you find a solution?

    I set the following extended properties when creating an appointment:

    • OnlineMeetingExternalLink
    • UCOpenedConferenceID
    • UCCapabilities
    • OnlineMeetingConfLink
    • UCInband
    • UCMeetingSetting
    • UCMeetingSettingSent

    But no luck.. my appoint still isn't a Lync/online meeting.

    Regards,
    Manuel

    Friday, December 6, 2013 10:02 AM
  • Eivind,


    Did you every get a successful implementation of this.  I am looking to do the same thing but have been unsuccessful in finding a solution.   Any help would be greatly appreciated.
    • Edited by Dr Doom Thursday, January 21, 2016 1:36 PM
    Thursday, January 21, 2016 1:34 PM
  • Hi Dr Doom,

    No, unfortunately we never found a solution to this. :-(

    Regards,
    Eivind

    Tuesday, February 16, 2016 10:03 PM
  • set the PidLidPropertyDefinitionStream property

    ExtendedPropertyType propertyLength = new ExtendedPropertyType { ExtendedFieldURI = new PathToExtendedFieldType { PropertyId = 34112, PropertyIdSpecified = true, PropertySetId = "00062008-0000-0000-c000-000000000046", PropertyType = MapiPropertyTypeType.Binary }, Item = "AwEKAAAAQQAAAAgAAAAAABAAQwBvAG4AZgBlAHIAZQBuAGMAZQBUAGUAbABVAFIASQAQQ29uZmVyZW5jZVRlbFVSSQAAAAAAAAAAIQAAABBDAG8AbgBmAGUAcgBlAG4AYwBlAFQAZQBsAFUAUgBJAAAAAABBAAAACAAAAAAAFQBPAG4AbABpAG4AZQBNAGUAZQB0AGkAbgBnAEMAbwBuAGYATABpAG4AawAVT25saW5lTWVldGluZ0NvbmZMaW5rAAAAAAAAAAArAAAAFU8AbgBsAGkAbgBlAE0AZQBlAHQAaQBuAGcAQwBvAG4AZgBMAGkAbgBrAAAAAABBAAAACAAAAAAAGQBPAG4AbABpAG4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AAAAAQQAAAAgAAAAAABQAVQBDAE8AcABlAG4AZQBkAEMAbwBuAGYAZQByAGUAbgBjAGUASQBEABRVQ09wZW5lZENvbmZlcmVuY2VJRAAAAAAAAAAAKQAAABRVAEMATwBwAGUAbgBlAGQAQwBvAG4AZgBlAHIAZQBuAGMAZQBJAEQAAAAAAA==" };

    (the PidLidPropertyDefinitionStream value is getting from a real Skype Appointment)

    Then you can set the Links: 

    • OnlineMeetingConfLink
    • OnlineMeetingExternalLink
    • OnlineMeetingInternalLink

    Use the UCMA SDK to create the Conference + Links

    you can create the Conference on the SkypeServer by using UCMA SDK.

    regards,

    Christian

    Tuesday, February 7, 2017 2:08 PM
  • Hi christian,

    can you please tell me how did you get the PropertyId, PropertySetId and PropertyType? Also can you please point me out the steps how and where to put links in the Appointment object?

    This is how I am trying to get the events with the extended properties:

    private static ExtendedPropertyDefinition CreateOnlineMeetingProperty()        
    {            
      ExtendedPropertyDefinition extendedOnlineMeetingProperty = new ExtendedPropertyDefinition(
    new Guid("{00062008-0000-0000-c000-000000000046}"), 34112, MapiPropertyType.Binary);  
              
      return extendedOnlineMeetingProperty;        
    }
     private static PropertySet GetLoadProperties(CalendarEventLightweightType lightweight)
            {
                ExtendedPropertyDefinition cleanGlobalObjectIdDefinition =
                    new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 0x23, MapiPropertyType.Binary);
    
                ExtendedPropertyDefinition extendedPlainTextBody = CreatePlainTextBodyProperty();
    
                ExtendedPropertyDefinition extendedOnlineMeeting = CreateOnlineMeetingProperty();
    
                var result = new PropertySet(
                    ItemSchema.Id,
                    AppointmentSchema.ICalUid,
                    ItemSchema.Subject,
                    AppointmentSchema.Start,
                    AppointmentSchema.End,
                    AppointmentSchema.Organizer,
                    AppointmentSchema.Location,
                    AppointmentSchema.LegacyFreeBusyStatus,
                    AppointmentSchema.IsCancelled,
                    AppointmentSchema.ICalRecurrenceId,
                    AppointmentSchema.MyResponseType, // Mandatory Meeting.MyResponseType can be retrieved without a search in the participant list
                    ItemSchema.LastModifiedTime,
                    AppointmentSchema.IsOnlineMeeting,
                    AppointmentSchema.IsMeeting,
                    ItemSchema.DisplayTo) { cleanGlobalObjectIdDefinition };
    
                result.Add(extendedOnlineMeeting);
    
                // If we need Unified communication links we must read the Body to parse them from it.
                if (((lightweight & CalendarEventLightweightType.WithoutBody) != CalendarEventLightweightType.WithoutBody) ||
                    ((lightweight & CalendarEventLightweightType.WithoutUnifiedCommunicationLinks) != CalendarEventLightweightType.WithoutUnifiedCommunicationLinks))
                {
                    result.Add(ItemSchema.Body);
                    result.Add(extendedPlainTextBody);
                }
    
                if ((lightweight & CalendarEventLightweightType.WithoutParticipants) != CalendarEventLightweightType.WithoutParticipants)
                {
                    result.Add(AppointmentSchema.RequiredAttendees);
                    result.Add(AppointmentSchema.OptionalAttendees);
                    result.Add(AppointmentSchema.Resources);
                }
    
                if ((lightweight & CalendarEventLightweightType.WithoutAll) != CalendarEventLightweightType.WithoutAll)
                {
                    result.Add(ItemSchema.Categories); // EWS Master Category List like personal, business, ...
                }
    
                result.RequestedBodyType = BodyType.HTML;
    
                return result;
            }


       var extendedOnlineMeeting = CreateOnlineMeetingProperty();
    
                try
                {
                    // Fetch appointments from calendar
                    var activeResults = service.FindAppointments(WellKnownFolderName.Calendar, calendarView).ToList();
                    if (activeResults.Count > 0)
                    {
                        // Load whole appointment with generated plain text body.
                        service.LoadPropertiesForItems(activeResults, properties);
    
                        foreach (Appointment result in activeResults)
                        {
    
                            string res;
                            result.TryGetProperty(extendedOnlineMeeting, out res);
    
                            string plainTextBody;
                            result.TryGetProperty(extendedPlainTextBody, out plainTextBody);
                            events.Add(this.calendarEventMapper.MapFrom(resource, result, plainTextBody, lightweight, participantsLimit));
                        }
                    }
                }
    

    Unfortunately I am getting an error in this line: result.TryGetProperty(extendedOnlineMeeting, out res);

    Property definition type 'Byte[]' and type parameter 'string' aren't compatible.
    Parameter name: propertyDefinition
             
    Tuesday, June 13, 2017 2:13 PM
  • Can you tell me bit more information. 
    Wednesday, April 25, 2018 12:51 AM