Reputation: 71591
I'm working with an older app built around EWS. To avoid connection limits against O365 (which were causing their own set of errors), I replaced one section of code with a call to the Graph API's calendarView
endpoint to get basic event data. Then, I pass the Graph.Event.Id
field to EWS in an Appointment.Bind()
call to get more detailed data on specific appointments (there's some stuff I get from the EWS endpoint in a single call that requires more round trips to more Graph endpoints, such as the mailbox type of specified attendees). If I had the time to totally rewrite the app to be Graph-centric I would, but that's not an option.
This cross-service setup works fine for non-recurring appointments, however when I try to do this for a recurring appointment (the first occurrence or any other beyond that), I get an "Id is malformed" error. Some online research pointed me to the ConvertId()
method on EWS, however I've passed pretty much every valid permutation of either the event's ID or the EWS ID with various input and output types with no luck. I've also tried the BindToRecurringMaster()
method, figuring if the meeting ID wasn't that of an "ordinary" appointment it might work as a master ID, but no luck there either.
I noticed a pattern to what works and what doesn't:
Works:
AAMkADM5Y2Q5ZDIzLWNiNmQtNDFjYi1hNTRmLTlhY2Q1MmU1MjhjMQBGAAAAAACWNntAvvbTEaUCAJAnobf9BwCIH/Ww71rUEZc9AJAn/KsIAAAA37hzAAAfEXqZ7ZaoRa1VhCtMHrpDAAAAAi0EAAA=
AAMkADM5Y2Q5ZDIzLWNiNmQtNDFjYi1hNTRmLTlhY2Q1MmU1MjhjMQBGAAAAAACWNntAvvbTEaUCAJAnobf9BwCIH/Ww71rUEZc9AJAn/KsIAAAA37hzAADJlr9CRY70S4M2e+CQA/6kAAAwzZBTAAA=
Fails:
AAMkADM5Y2Q5ZDIzLWNiNmQtNDFjYi1hNTRmLTlhY2Q1MmU1MjhjMQFRAAgI15lN3USAAEYAAAAAljZ7QL720xGlAgCQJ6G3-QcAiB-1sO9a1BGXPQCQJ-yrCAAAAN_4cwAAHxF6me2WqEWtVYQrTB66QwAAAAItBQAAEA==
AAMkADM5Y2Q5ZDIzLWNiNmQtNDFjYi1hNTRmLTlhY2Q1MmU1MjhjMQFRAAgI15VgCTPAAEYAAAAAljZ7QL720xGlAgCQJ6G3-QcAiB-1sO9a1BGXPQCQJ-yrCAAAAN_4cwAAHxF6me2WqEWtVYQrTB66QwAAAAItAAAAEA==
I can provide more info as needed, not sure exactly what else would be helpful that doesn't require the account creds.
Upvotes: 0
Views: 457
Reputation: 17702
There's an API for that on Graph: https://learn.microsoft.com/graph/api/user-translateexchangeids?view=graph-rest-1.0&tabs=http. You could convert from restId
to ewsId
that way, should do what you need.
Upvotes: 1