How to map Aspose.Email.Mail.Appointment.UniqueId with Interop.Outlook.AppointmentItem.GlobalAppointmentId

When we create a meeting request (Aspose.Email.Mail.Appointment) and send it through SmtpClient, we can set the UniqueId property which is used to identify the Meeting item in Outlook.

For ex I can set the unique id as “123” and send an appointment. And if I need to update the appointment, I would send another meeting with the same UniqueId i.e., “123”

But when I try to get that appointment from the Outlook / Outlook Addin, this UniqueId is not available anywhere.

Also the provided GlobalAppointmentId is not same as this UniqueId Id.

Please let us know how we can map these two Ids?

Note: Our requirement is to Sync the Outlook Meetings with an external application through the meeting requests are sent (using Aspose.Email)

Hi Deivarayan,


Thank you for writing to us.

After an initial investigation, I could observe the difference between the UniqueId and GlobalId by Outlook Interop for the same appointment, but at the same time, could not find any mapping between the two. I have sought help from our development team in this regard under issue id: NETWORKNET-33769 and will update you as soon as there is some information available in this regard.

Hi Kashif,

Thanks for the reply. Can you please let me know the approximate time to get the information about the mapping between UniqueId and GlobalAppointmentID?

Thanks,

Deivarayan

Hi Deivarayan,


Issues are addressed on first come first serve basis in addition to any PS or ES issues that are always served on Priority basis. This issue is pending for analysis by the development team and once there is any update available in this regard, I’ll update you here.

Hi Deivatayan,


Please give a try to the following sample code which provides mapping between Aspose.Email.Appointment.UniqueId and Interop.Outlook.AppointmentItem.GlobalAppointmentId.

public static void Main(string[] args)
{
string globalAppointmentId = FromUniqueIdToGlobalAppointmentId(“2bdf42da-9fe4-494b-8cb1-9fbe26f69b36”);
}

private static string FromUniqueIdToGlobalAppointmentId(string guid)
{
const string prefix = “040000008200E00074C5B7101A82E0080000000000000000000000000000000000000000310000007643616C2D55696401000000”;
byte[] buffer = Encoding.ASCII.GetBytes(guid);
string uidString = string.Empty;
foreach (byte b in buffer)
{
uidString += b.ToString(“X2”);
}
string globalObjectId = string.Format("{0}{1}00", prefix, uidString);
buffer = new byte[globalObjectId.Length / 2];
for (int i = 0; i < globalObjectId.Length / 2; i++)
{
byte hexValue = byte.Parse(globalObjectId.Substring(i * 2, 2), NumberStyles.AllowHexSpecifier);
buffer[i] = hexValue;
}
return BitConverter.ToString(buffer).Replace("-", string.Empty);
}

Please feel free to write us back if you have any other query in this regard.