Searching for Exchange Items in Organization Backups

In this article

    You can search for Exchange items in backups of a Microsoft 365 organization.

    Request

    POST https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/organization/searchExchange

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Parameters

    The following parameter must be specified in the URL of the request:

    Parameter

    Type

    Description

    restoreSessionId

    string

    Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

    Request Body

    The request body must contain the following property:

    Property

    Type

    Description

    query

    string

    Specifies query parameters used to search for Exchange items. For more information, see Query Parameters.

    Query Parameters

    The following table lists examples of parameters that you can use in the query string to search for Exchange items in backups of a Microsoft 365 organization.

    For the complete list of supported query parameters, see Appendix A. Item Search Parameters.

    Parameter

    Type

    Description

    from

    string

    Specifies the name of the sender.

    Query example: from:admin.

    to

    string

    Specifies the name of the recipient.

    Query example: to:user.

    hasattachments

    string

    Defines whether the post has attachments.

    Query example: hasattachments:true.

    body

    string

    Specifies the part of the post message body.

    Query example: body:information.

    subject

    string

    Specifies the post subject or part of the post subject.

    Query example: subject:announcement.

    Request Example

    Request:

    POST https://abc.tech.local:4443/v6/RestoreSessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/searchExchange

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

       "query": "from:user_X to:user_Y"

    }

    Searching for Exchange Items in Organization Backups Note

    If a value for a query parameter contains a space, provide the value in the quotation marks (""). Use the backslash (\) symbol as an escape character before these quotation marks. For example: "query": "from: \"user X\" to: \"user Y\"".

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response body contains the following properties:

    Property

    Type

    Description

    results

    Results Object

    Contains the Results object.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    Results Object

    Results Object for Task

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    status

    string

    Specifies the task status. The following values are available:

    • NotStarted
    • InProgress
    • Completed
    • WaitingOnsomeoneelse
    • Deferred

    percentComplete

    integer

    Specifies the task progress.

    startDate

    UTC

    Specifies the date and time when the task was started.

    dueDate

    UTC

    Specifies the date and time when the task must be completed.

    owner

    string

    Specifies the owner of the task.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

    Results Object for Journal

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    subject

    string

    Specifies the task status. The following values are available:

    • NotStarted
    • InProgress
    • Completed
    • WaitingOnsomeoneelse
    • Deferred

    startDate

    UTC

    Specifies the date and time when the task was started.

    duration

    integer

    Specifies the duration of the journal entry in hours.

    entryType

    string

    Specifies the journal entry type.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

    Results Object for Note

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    name

    string

    Specifies the name of the note.

    date

    string

    Specifies the date when the note was created.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

    Results Object for Message

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    from

    string

    Specifies the sender mailbox email address.

    to

    string

    Specifies the recipient mailbox email address.

    cc

    string

    Specifies the recipient email address in carbon copy.

    bcc

    string

    Specifies the recipient address in blind carbon copy.

    subject

    string

    Specifies the subject of the email message.

    sent

    UTC

    Specifies the date and time when the message was sent.

    received

    UTC

    Specifies the date and time when the message was received.

    reminder

    boolean

    If set to true, indicates that the message was sent with the reminder.

    importance

    string

    Specifies the message importance. The following values are available:

    • Low
    • Normal
    • High

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

    Results Object for Appointment

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    startTime

    UTC

    Specifies the date and time when the appointment starts.

    endTime

    UTC

    Specifies the date and time when the appointment finishes.

    organizer

    string

    Specifies the appointment organizer.

    location

    string

    Specifies the location where the appointment is held.

    subject

    string

    Specifies the subject of the appointment.

    attendees

    string[]

    Specifies the appointment attendees.

    recurring

    boolean

    If set to true, indicates that the appointment is recurring.

    recurrencePatternFormat

    string

     

    attachments

    attachment

    Specifies attachment items for the appointment item.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

    attachments

    Property

    Type

    Description

    name

    string

    Specifies a name of the attachment item.

    sizeBytes

    integer

    Specifies a size of the attachment item.

    Results Object for Contact

    Property

    Type

    Description

    id

    string

    Specifies the Exchange item ID.

    itemClass

    string

    Specifies the Exchange item class.

    fullName

    string

    Specifies the full name of the contact.

    mobile

    string

    Specifies the mobile phone number of the contact.

    homePhone

    string

    Specifies the home phone number of the contact.

    fax

    string

    Specifies the fax number of the contact.

    address

    string

    Specifies the contact address.

    company

    string

    Specifies the company of the contact.

    jobTitle

    string[]

    Specifies the contact job title.

    email

    string

    Specifies the contact email.

    businessPhone

    string

    Specifies the business phone number of the contact.

    webPage

    string

    Specifies the webpage of the contact.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    _actions

    Dictionary of string [key] and Object [value]

    Links to related actions (navigation property).

     

    Response Example

    Response:

    200 OK

     

    Response Body:

    {

     "offset": 0,

     "limit": 30,

     "_links": {

       "self": {

         "href": "/v6/RestoreSessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/searchExchange?offset=0&limit=30"

       },

       "next": {

         "href": "/v6/RestoreSessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/searchExchange?offset=30&limit=30"

       }

     },

     "results": [

       {

         "attachments": [

           {

             "name": "test.log",

             "sizeBytes": 9732

           }

         ],

         "subject": "Test message",

         "itemClass": "IPM.Note",

         "_links": {

           "self": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV"

           },

           "parent": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/folders/AAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAA"

           },

           "mailbox": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a"

           }

         },

         "_actions": {

           "restoreToOriginalLocation": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/restore",

             "method": "POST"

           },

           "restoreTo": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/restoreTo",

             "method": "POST"

           },

           "exportToPst": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/exportToPst",

             "method": "POST"

           },

           "saveToMsg": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/Save",

             "method": "POST"

           },

           "sendToDefaultAddress": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/sendToDefaultAddress",

             "method": "POST"

           },

           "sendToDifferentAddress": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV/sendToDifferentAddress",

             "method": "POST"

           }

         },

         "id": "LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAOyf2VQAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADsn9lUAABKg1Dx9fzoSLDQEN9JKV4uAADsoFcsAABKg1Dx9fzoSLDQEN9JKV4uAADxB5oV",

         "from": "admin",

         "cc": "",

         "bcc": "",

         "to": "User1",

         "sent": "2021-10-15T09:31:32.9552546Z",

         "received": "2021-10-15T09:31:30.776Z",

         "reminder": false,

         "importance": "High"

       },

        {

         "subject": "New email",

         "itemClass": "IPM.Note",

         "_links": {

           "self": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe"

           },

           "parent": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/folders/AAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAA"

           },

           "mailbox": {

             "href": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a"

           }

         },

         "_actions": {

           "restoreToOriginalLocation": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/restore",

             "method": "POST"

           },

           "restoreTo": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/restoreTo",

             "method": "POST"

           },

           "exportToPst": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/exportToPst",

             "method": "POST"

           },

           "saveToMsg": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/Save",

             "method": "POST"

           },

           "sendToDefaultAddress": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/sendToDefaultAddress",

             "method": "POST"

           },

           "sendToDifferentAddress": {

             "uri": "v6/restoresessions/57fe8848-0185-491a-a0e1-f819ca400e60/organization/mailboxes/5be33e70-d221-4883-a8f7-1608c8dae27a/items/LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe/sendToDifferentAddress",

             "method": "POST"

           }

         },

         "id": "LgAAAEYAAAAWAAAAAAAAAH0txU4dyN5Av7kLIdwewNMBAEqDUPH1_OhIsNAQ30kpXi4AAPLdiocAAAAAAAB9LcVOHcjeQL-5CyHcHsDTBwBKg1Dx9fzoSLDQEN9JKV4uAADy3YqHAABKg1Dx9fzoSLDQEN9JKV4uAADy3ZD0AABKg1Dx9fzoSLDQEN9JKV4uAADyEJVe",

         "from": "admin1",

         "cc": "admin2; admin3",

         "bcc": "",

         "to": "User1",

         "sent": "2021-03-19T17:11:23Z",

         "received": "2021-03-19T17:11:24.5069509Z",

         "reminder": false,

         "importance": "Normal"

       },

       ....

     ],

     "setId": "00000000-0000-0000-0000-000000000000"

    }