Search code examples
exchangewebservicesews-managed-api

ServiceId.UniqueId Maximum Length and Format


Every Item (e.g. Task) in Exchange Web Services (EWS) Managed API has an Id property of type ItemId, which then has a String property named UniqueId (inherited from ServiceId — phew, got that?).

I'm planning to keep the value of UniqueId in a database so I need to know what the maximum length of the column should be. Some testing shows that it's at least 152 bytes in length, but that seems like a strange size for a maximum.

A second part to this question is the format of the value. Is this something that can be parsed into a more common type, like a Guid? I'm grasping at straws, I know.


Solution

  • To be safe, we've suggested setting aside 512 characters for the EWS identifier. While I don't expect that it will ever be lengthened to near 512 characters, Microsoft reserves the right to change the format. I highly doubt Exchange will change the format at this point.

    Regarding the format of the identifier -- it is intended to be opaque and so it should be neither parsed nor reconstructed.