none
What is the lifetime of an Server ID in the EAS protocol? RRS feed

  • Question

  • This question is about section 2.2.3.155 of the MS-ASCMD documentation.

    Specifically, the GetHierarchy command in section 2.2.3.155.5. provides some information about the Server Id returned, but it does not provide the following.

    For a given folder:

    - Is the Server ID consistent across devices?

    - At what point will that Server ID become invalid? 

    - Is it valid forever for a specific device?

    - Or is it valid only until the next GetHierarchy using a synchronization key of 0?

    - Or is it valid only until the device is reprovisioned?

    - Or can it change at any time?

    Similarly, the Sync command in section 2.2.3.155.7 does not provide the following information:

    For a given email:

    - Is the Server ID consistent across devices?

    - At what point will that Server ID become invalid? 

    - Is it valid forever for a specific device?

    - Or is it valid only until the next Sync of it's containing folder using a synchronization key of 0?

    - Or is it valid only until the device is reprovisioned?

    - Or can it change at any time?

    - Does it change when the email is moved to a different folder?

    Tuesday, February 14, 2017 4:34 PM

Answers

  • Hi crashwrite, after a lot of investigation and testing I believe that I have answers to each of your questions assuming that the mail server is Exchange. However, it's important to understand that the protocol does not dictate how a server manages the ServerID internally for different object types or even what the value 'looks' like. It only states that it's a 64-byte string value. I've addressed each of your questions below. Please let me know if you have any other questions.

    For Folders:

    1. Is the Server ID consistent across devices?
    No.

    2. At what point will that Server ID become invalid? 
    For a given device, when the folder is deleted.

    3. Is it valid forever for a specific device?
    Yes, until deleted. After that, never again for that device unless the device is removed and then re-provisioned.

    4. Or is it valid only until the next GetHierarchy using a synchronization key of 0?
    I think you mean the FolderSync command. GetHierarchy does not take a SyncKey. No, it is still valid and will not change if you send a FolderSync command with a SyncKey of 0.

    5. Or is it valid only until the device is re-provisioned?
    No, it is still valid and will not change after the device is re-provisioned as long as that the device has not been removed and the device information has not changed. 

    6. Or can it change at any time?
    No.


    For Messages:

    1. Is the Server ID consistent across devices?
    If the server is Exchange 16.x, yes. Otherwise, No. This is due to a difference in the format of the ServerID value that is used by the different versions. Prior to 16.x, the ServerID of the folder was part of the ServerID of the message. Because the ServerID of folders is not consistent across devices, the ServerID of messages isn't either.

    2. At what point will that Server ID become invalid?
    When the message is deleted or moved to a different folder.

    3. Is it valid forever for a specific device?
    Yes, until the message is deleted or moved to a different folder.

    4. Or is it valid only until the next Sync of its containing folder using a synchronization key of 0?
    No, it is still valid and will not change is you send a Sync command with a SynKey of 0, unless the message is deleted or moved to a different folder.

    5. Or is it valid only until the device is re-provisioned?
    No, it is still valid and will not change after the device is re-provisioned as long as that the device has not been removed and the device information has not changed.

    6. Or can it change at any time?
    No, It will only change if the message is moved to a different folder.

    7. Does it change when the email is moved to a different folder?
    Yes.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, February 28, 2017 9:52 PM
    Moderator
  • Hi Rich,

     

    Other than when a user deliberately removes the mobile device from their account, the only time an Exchange Server should 'remove' a device is if the server-side sync data for that device becomes corrupted and  has to be deleted. In that case, the device will receive an error that indicates that a re-provision is required.

     

    It's also important to know that the server-side sync data for a device is associated with a combination of the DeviceType and DeviceID sent by the client during the provisioning process. If, for some reason, either of those change the server will consider it to be a different device. From the client's perspective, this would be very similar to the original provisioning process because it has to start over from scratch.

     

    In addition through Mobile Device Management and Intune Device management there is the capability to perform a Remote Device Retirement.When a device managed by an MDM or Intune system is retired, all the corporate information, email accounts, VPN connections, Wi-Fi connections, policy settings, apps, and data that the apps deployed are removed by the MDM or Intune System. In this scenario the retirement would cause a server-side removal of a device.

     

    As mentioned previously, this only applies to Exchange Server. 3rd party server implementations of the EAS protocols may handle it differently.

    Please let me know if this answers your question.

    Will Gregg | escalation engineer | open specifications

    Friday, March 10, 2017 7:38 PM
    Moderator

All replies

  • Hello crashwrite:

    Thank you for your inquiry about Microsoft Office Specifications. We have created an incident to investigate this issue. One of the Open specifications team member will contact you shortly.

    Thanks.


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Tuesday, February 14, 2017 5:10 PM
  • Hi crashwrite, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, February 14, 2017 9:54 PM
    Moderator
  • Hi crashwrite, after a lot of investigation and testing I believe that I have answers to each of your questions assuming that the mail server is Exchange. However, it's important to understand that the protocol does not dictate how a server manages the ServerID internally for different object types or even what the value 'looks' like. It only states that it's a 64-byte string value. I've addressed each of your questions below. Please let me know if you have any other questions.

    For Folders:

    1. Is the Server ID consistent across devices?
    No.

    2. At what point will that Server ID become invalid? 
    For a given device, when the folder is deleted.

    3. Is it valid forever for a specific device?
    Yes, until deleted. After that, never again for that device unless the device is removed and then re-provisioned.

    4. Or is it valid only until the next GetHierarchy using a synchronization key of 0?
    I think you mean the FolderSync command. GetHierarchy does not take a SyncKey. No, it is still valid and will not change if you send a FolderSync command with a SyncKey of 0.

    5. Or is it valid only until the device is re-provisioned?
    No, it is still valid and will not change after the device is re-provisioned as long as that the device has not been removed and the device information has not changed. 

    6. Or can it change at any time?
    No.


    For Messages:

    1. Is the Server ID consistent across devices?
    If the server is Exchange 16.x, yes. Otherwise, No. This is due to a difference in the format of the ServerID value that is used by the different versions. Prior to 16.x, the ServerID of the folder was part of the ServerID of the message. Because the ServerID of folders is not consistent across devices, the ServerID of messages isn't either.

    2. At what point will that Server ID become invalid?
    When the message is deleted or moved to a different folder.

    3. Is it valid forever for a specific device?
    Yes, until the message is deleted or moved to a different folder.

    4. Or is it valid only until the next Sync of its containing folder using a synchronization key of 0?
    No, it is still valid and will not change is you send a Sync command with a SynKey of 0, unless the message is deleted or moved to a different folder.

    5. Or is it valid only until the device is re-provisioned?
    No, it is still valid and will not change after the device is re-provisioned as long as that the device has not been removed and the device information has not changed.

    6. Or can it change at any time?
    No, It will only change if the message is moved to a different folder.

    7. Does it change when the email is moved to a different folder?
    Yes.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, February 28, 2017 9:52 PM
    Moderator
  • Hi Josh,

    Thanks for the detailed answer. It is much appreciated.

    On number 4, you are correct. I did mean FolderSync.

    It probably goes beyond the scope of this question and forum, but is there any documentation or information about the types of events that can cause a device to be removed? Does that only happen when a human takes explicit action to do so, or are there other circumstances that can cause that?

    -Rich

    Friday, March 3, 2017 12:43 AM
  • Hi Rich,

     

    Other than when a user deliberately removes the mobile device from their account, the only time an Exchange Server should 'remove' a device is if the server-side sync data for that device becomes corrupted and  has to be deleted. In that case, the device will receive an error that indicates that a re-provision is required.

     

    It's also important to know that the server-side sync data for a device is associated with a combination of the DeviceType and DeviceID sent by the client during the provisioning process. If, for some reason, either of those change the server will consider it to be a different device. From the client's perspective, this would be very similar to the original provisioning process because it has to start over from scratch.

     

    In addition through Mobile Device Management and Intune Device management there is the capability to perform a Remote Device Retirement.When a device managed by an MDM or Intune system is retired, all the corporate information, email accounts, VPN connections, Wi-Fi connections, policy settings, apps, and data that the apps deployed are removed by the MDM or Intune System. In this scenario the retirement would cause a server-side removal of a device.

     

    As mentioned previously, this only applies to Exchange Server. 3rd party server implementations of the EAS protocols may handle it differently.

    Please let me know if this answers your question.

    Will Gregg | escalation engineer | open specifications

    Friday, March 10, 2017 7:38 PM
    Moderator
  • Thanks!
    Friday, March 17, 2017 11:21 PM