none
EWS - Unable to change JoinOnlineMeetingURL RRS feed

  • Question

  • I am trying to change the Joinonlinemeetingurl property using EWS, however I am getting an error "Joineonlinemeetingurl is a read only property". Is there anyway to update this URL. Also, the same behavior is noticed when I am trying to add required attendees, any help is appreciated.

    Import-Module 'C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll'
    $exchservice = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService -ArgumentList ([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2013_Sp1)
    $exchService.Credentials = New-Object  Microsoft.Exchange.WebServices.Data.WebCredentials($cred.username,$cred.GetNetworkCredential().password);
    if ($EWSUrl -eq $null){
    	$exchService.AutodiscoverUrl($emailAddress,{$true})
    	$global:EWSUrl = $exchservice.url
    }
    else {
    	$exchservice.url = $EWSUrl
    }
    $exchService.ImpersonatedUserId = New-Object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,$emailAddress);
    
    $FolderID = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Calendar,$MailboxSMTP)
    $Calendar = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($exchservice,$FolderID)
    $ItemPropertySet = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::IDOnly)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Start)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::End)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Duration)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Organizer)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::RequiredAttendees)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Subject)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::IsAllDayEvent)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::IsRecurring)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Body)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::TextBody)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::DisplayTo)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::DisplayCc)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Location)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::FirstOccurrence)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::LastOccurrence)
    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::JoinOnlineMeetingUrl)
    $itemview =  New-Object Microsoft.Exchange.WebServices.Data.ItemView(10000)
    $Date = Get-Date 03/08/2016
    $SearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsGreaterThan([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Start,$Date )
    $CalendarItems = $exchservice.FindItems($Calendar.Id,$SearchFilter,$itemview)
     [array]$userorganizedlyncmeetings = $CalendarItems  | where { ($_.JoinOnlineMeetingUrl -match "xyz.test")}
        foreach ( $meeting in $userorganizedlyncmeetings){
       
        $ItemID = [Microsoft.Exchange.WebServices.Data.Appointment]::Bind($exchservice,$meeting.Id)
        $ItemID.subject
        $ItemID.Start
        $ItemID.End
        $ItemID.OptionalAttendees
        $ItemID.Organizer.Address
        $ItemID.JoinOnlinemeetingURL = $ItemID.JoinOnlineMeetingURL.Replace("xyz","abc")
        $ItemID.Body.Text = $ItemID.Body.Text -replace ("xyz", "abc")
        $ItemID.Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverwrite)
    
        }

    Friday, March 11, 2016 2:17 AM

Answers

  • I think you will need to update the extended property OnlineMeetingExternalLink instead  eg try something like

    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::JoinOnlineMeetingUrl)
    $OnlineMeetingExternalLink = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition([Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet]::PublicStrings, "OnlineMeetingExternalLink", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)
    $ItemPropertySet.add($OnlineMeetingExternalLink)
    $itemview =  New-Object Microsoft.Exchange.WebServices.Data.ItemView(1000)
    $Date = Get-Date 03/08/2016
    $SearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsGreaterThan([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Start,$Date )
    
    $CalendarItems = $null    
    do{    
       $CalendarItems = $exchservice.FindItems($Calendar.Id,$SearchFilter,$itemview)
       [Void]$service.LoadPropertiesForItems($CalendarItems,$ItemPropertySet)  
       [array]$userorganizedlyncmeetings = $CalendarItems  | where { ($_.JoinOnlineMeetingUrl -match "xyz.test")}
        foreach ( $meeting in $userorganizedlyncmeetings){
     
        $meeting .subject
        $meeting .Start
        $meeting .End
        $meeting .OptionalAttendees
        $meeting .Organizer.Address
       	if($meeting.TryGetProperty($OnlineMeetingExternalLink,[ref]$OnlineMeetingExternalLinkValue))
    	{
    		$meeting.SetExtendedProperty($OnlineMeetingExternalLink,($OnlineMeetingExternalLinkValue -replace ("xyz", "abc")))
    	}	
        $meeting .Body.Text = $ItemID.Body.Text -replace ("xyz", "abc")
        $meeting .Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverwrite)
    
        }
        $ItemView.Offset += $CalendarItems.Items.Count    
    }while($CalendarItems.MoreAvailable -eq $true) 

    Cheers
    Glen



    Monday, March 14, 2016 3:03 AM

All replies

  • I think you will need to update the extended property OnlineMeetingExternalLink instead  eg try something like

    $ItemPropertySet.add([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::JoinOnlineMeetingUrl)
    $OnlineMeetingExternalLink = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition([Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet]::PublicStrings, "OnlineMeetingExternalLink", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)
    $ItemPropertySet.add($OnlineMeetingExternalLink)
    $itemview =  New-Object Microsoft.Exchange.WebServices.Data.ItemView(1000)
    $Date = Get-Date 03/08/2016
    $SearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsGreaterThan([Microsoft.Exchange.WebServices.Data.AppointmentSchema]::Start,$Date )
    
    $CalendarItems = $null    
    do{    
       $CalendarItems = $exchservice.FindItems($Calendar.Id,$SearchFilter,$itemview)
       [Void]$service.LoadPropertiesForItems($CalendarItems,$ItemPropertySet)  
       [array]$userorganizedlyncmeetings = $CalendarItems  | where { ($_.JoinOnlineMeetingUrl -match "xyz.test")}
        foreach ( $meeting in $userorganizedlyncmeetings){
     
        $meeting .subject
        $meeting .Start
        $meeting .End
        $meeting .OptionalAttendees
        $meeting .Organizer.Address
       	if($meeting.TryGetProperty($OnlineMeetingExternalLink,[ref]$OnlineMeetingExternalLinkValue))
    	{
    		$meeting.SetExtendedProperty($OnlineMeetingExternalLink,($OnlineMeetingExternalLinkValue -replace ("xyz", "abc")))
    	}	
        $meeting .Body.Text = $ItemID.Body.Text -replace ("xyz", "abc")
        $meeting .Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverwrite)
    
        }
        $ItemView.Offset += $CalendarItems.Items.Count    
    }while($CalendarItems.MoreAvailable -eq $true) 

    Cheers
    Glen



    Monday, March 14, 2016 3:03 AM
  • Thanks a lot Glen, spot on!!
    Tuesday, March 15, 2016 12:59 AM
  • Glen,

    can you please guide, how to update these properties as well. thanks in advance

    -OnlineMeetingConfLink

    -UCMeetingSetting

    -UCMeetingSettingSent

    Tuesday, October 25, 2016 2:40 PM
  • You need to look at a sample item with a Mapi editor like OutlookSpy or MFCMapi and find the properties you want and then create the Extended property definition for that property you want to update/read. If you look at what I did OnlineMeetingExternalLink you can use this as a template for the new property you want to add. You do need to check the Datatype of the properties and change that if it different from String eg most should be like

    $OnlineMeetingConfLink = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition([Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet]::PublicStrings, "OnlineMeetingConfLink", [Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String)
    
    Cheers
    Glen

    Wednesday, October 26, 2016 1:48 AM
  • OnlineMeetingExternalLink and related properties are not documented for usage with EWS. OnlineMeetingExternalLinkis noted under EAS in the Exchange protocol documents for a GET operation.  UC related settings are overall not documented. Until they are documented its best to not use them as you will be risking the chance they are changed or dropped.

    Dan

    Thursday, August 17, 2017 7:44 PM