2.1.3.1.1.20.26 Property: UID
RFC Reference: [RFC2445] section 4.8.4.7
Number of Instances Allowed: 0, 1
Format: Text ([RFC2445] section 4.3.11)
Brief Description: Provides a globally unique identifier for the appointment.
Importing to Calendar objects
There are two supported forms of textual representation of the UID property. The Augmented Backus-Naur Form (ABNF) syntax, as specified in [RFC5234], for this value is shown in the following example.
-
UID = EncodedGlobalId / ThirdPartyGlobalId EncodedGlobalId = Header GlobalIdData ThirdPartyGlobalId = 1*UTF8-octets ; Assuming UTF-8 is the encoding Header = ByteArrayID InstanceDate CreationDateTime Padding DataSize ByteArrayID = "040000008200E00074C5B7101A82E008" InstanceDate = InstanceYear InstanceMonth InstanceDay InstanceYear = 4*4HEXDIG ; UInt16 InstanceMonth = 2*2HEXDIG ; UInt8 InstanceDay = 2*2HEXDIG ; UInt8 CreationDateTime = FileTime FileTime = 16*16HEXDIG ; UInt64 Padding = 16*16HEXDIG ; "0000000000000000" recommended DataSize = 8*8HEXDIG ; UInt32 little-endian GlobalIdData = 2*HEXDIG UTF8-octets = *( UTF8-char ) UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4 UTF8-1 = %x00-7F UTF8-2 = %xC2-DF UTF8-tail UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / %xF4 %x80-8F 2( UTF8-tail ) UTF8-tail = %x80-BF
To be of type EncodedGlobalId, the value of the UID property MUST satisfy the following constraints:
Every character MUST be a HEXDIG.
The length of the string MUST be eighty-two (82) characters or more.
The length of the string MUST be evenly divisible by 2.
The first thirty-two characters MUST match (case insensitive)<203> "040000008200E00074C5B7101A82E008".
Otherwise, the UID property is of type ThirdPartyGlobalId.
If the UID is of type EncodedGlobalId, then the data MUST be decoded to its binary representation (every two HEXDIGs compose one byte).
A temporary variable EffectiveInstanceDate is defined as follows:
If the UID is of type EncodedGlobalId and if the InstanceDate portion of the UID is a valid date in the range of January 1st, 1601 to December 31st, 4500 (inclusive), then the EffectiveInstanceDate is the ThirdPartyGlobalId portion of the UID.
If the UID is of type EncodedGlobalId but the ThirdPartyGlobalId portion of the UID is not a valid date in the range of January 1st, 1601 to December 31st, 4500 (inclusive), then the EffectiveInstanceDate is the date from the RECURRENCE-ID property (in its local time zone). In the case where RECURRENCE-ID property is not present, the EffectiveInstanceDate is zero (Year = Month = Day = 0).
If the UID is of type ThirdPartyGlobalId, then the EffectiveInstanceDate is the date from the RECURRENCE-ID property (in its local time zone). In the case where RECURRENCE-ID property is not present, the EffectiveInstanceDate is zero (Year = Month = Day = 0).
If the UID is of type EncodedGlobalId, it MUST be imported into PidLidGlobalObjectId as specified below. The PidLidGlobalObjectId structure is specified in [MS-OXOCAL] section 2.2.1.27.
The Byte Array ID field MUST be set to: 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0xE0, 0x00, 0x74, 0xC5, 0xB7, 0x10, 0x1A, 0x82, 0xE0, 0x08.
The YH field MUST be set to the high byte of the EffectiveInstanceDate's year.
The YL field MUST be set to the low byte of the EffectiveInstanceDate's year.
The M field MUST be set to the value of the EffectiveInstanceDate's month.
The D field MUST be set to the value of the EffectiveInstanceDate's day.
The Creation Time field MUST be set to the CreationDateTime value.
The X field MUST be set to the Padding value.
The Size field MUST be set to the DataSize value.
The Data field MUST be set to the binary value of GlobalIdData.
If the UID is of type EncodedGlobalId, it MUST also be imported into PidLidCleanGlobalObjectId ([MS-OXPROPS] section 2.57) as specified below. The PidLidCleanGlobalObjectId structure is specified in [MS-OXOCAL] section 2.2.1.28.
The Byte Array ID field MUST be set to: 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0xE0, 0x00, 0x74, 0xC5, 0xB7, 0x10, 0x1A, 0x82, 0xE0, 0x08.
The YH field MUST be set to 0x00.
The YL field MUST be set to 0x00.
The M field MUST be set to 0x00.
The D field MUST be set to 0x00.
The Creation Time field MUST be set to the CreationDateTime value.
The X field MUST be set to the Padding value.
The Size field MUST be set to the DataSize value.
The Data field MUST be set to the binary value of GlobalIdData.
If the UID is of type ThirdPartyGlobalId, it MUST be imported into PidLidGlobalObjectId as specified below.
The Byte Array ID field MUST be set to: 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0xE0, 0x00, 0x74, 0xC5, 0xB7, 0x10, 0x1A, 0x82, 0xE0, 0x08.
The YH field MUST be set to the high byte of the EffectiveInstanceDate's year.
The YL field MUST be set to the low byte of the EffectiveInstanceDate's year.
The M field MUST be set to the value of the EffectiveInstanceDate's month.
The D field MUST be set to the value of the EffectiveInstanceDate's day.
The Creation Time field MUST be set to 0x0000000000000000.
The X field MUST be set to 0x0000000000000000.
The Size field MUST be set to the number of OCTETS in ThirdPartyGlobalId (UTF-8 encoded length) + 0x0000000C.
The Data field MUST be set to the following bytes: 0x76, 0x43, 0x61, 0x6C, 0x2D, 0x55, 0x69, 0x64, 0x01, 0x00, 0x00, 0x00, followed by the value of ThirdPartyGlobalId (encoded in UTF-8).
If the UID is of type ThirdPartyGlobalId, it MUST also be imported into PidLidCleanGlobalObjectId as specified below.
The Byte Array ID field MUST be set to: 0x04, 0x00, 0x00, 0x00, 0x82, 0x00, 0xE0, 0x00, 0x74, 0xC5, 0xB7, 0x10, 0x1A, 0x82, 0xE0, 0x08.
The YH field MUST be set to 0x00.
The YL field MUST be set to 0x00.
The M field MUST be set to 0x00.
The D field MUST be set to 0x00.
The Creation Time field MUST be set to 0x0000000000000000.
The X field MUST be set to 0x0000000000000000.
The Size field MUST be set to the number of OCTETS in ThirdPartyGlobalId (UTF-8 encoded length) + 0x0000000C.
The Data field MUST be set to the following bytes: 0x76, 0x43, 0x61, 0x6C, 0x2D, 0x55, 0x69, 0x64, 0x01, 0x00, 0x00, 0x00, followed by the value of ThirdPartyGlobalId (encoded in UTF-8).
Exporting from Calendar objects
If the Data field of PidLidGlobalObjectId begins with the following 12 bytes: 0x76, 0x43, 0x61, 0x6C, 0x2D, 0x55, 0x69, 0x64, 0x01, 0x00, 0x00, 0x00, the remainder of the Data field (starting at the 13th byte) MUST be treated as a UTF-8 encoded string and exported directly as the UID property.
Otherwise, a modified copy of PidLidGlobalObjectId, with the YH, YL, M, and D fields set to 0x00, MUST be encoded as a hexadecimal string, and exported as the UID property.