Maximum length and format of service.

Each Item (e.g. Task ) in the Exchange Web Services Managed Interface (EWS) has an Id property of type ItemId , which then has a String property called UniqueId (inherited from ServiceId phew, got this?).

I plan on storing the UniqueId value in the database, so I need to know what the maximum column length should be. Some testing shows that the length is at least 152 bytes, but this seems like a weird size for the maximum.

The second part of this question is the format of the value. Is this something that can be parsed into a more general type like Guid ? I understand that I know a straw.

+8
source share
2 answers

To be safe, we suggested deferring 512 characters for the EWS identifier. Although I do not expect it to ever be expanded to 512 characters, Microsoft reserves the right to change the format. I highly doubt that Exchange will change the format at this point.

As for the format of the identifier, it should be opaque and therefore it should not be disassembled or reconstructed.

+3
source

From EWS Identifiers in Exchange :

  • The value of ItemID for folders and items is case sensitive. If you look at the item identifier for the folder or item returned by the FindItem operation (or using the Managed API FindItems EWS API method), you might think that this is a duplicate of another item identifier; however, one or more characters in the element identifiers for the two elements will have a different case.
  • If you intend to store the item identifier in the database for later retrieval, we recommend that the field size be 512 bytes, so it is large enough to hold the GUID.
  • Do not assume that your identifier will always be valid if you need to return the item later. If an item is moved to storage, the identifier may change due to how the movement is handled. The item is actually copied and a new identifier is created, and then the original item is deleted.
+4
source

All Articles