StaleMailbox report

Important: These reports are deprecated as of January 29, 2018. We recommend that you use the Microsoft Graph Email activity reports instead.

The StaleMailbox REST URI provides summary statistics about the number of Office 365 organization mailboxes that have not been accessed recently. Use this report in combination with StaleMailboxDetail report to manage inactive mailboxes.

Applies to: Office 365

REST URIs

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/StaleMailbox[?ODATA options]

Fields

The following fields can be specified in $select and $filter ODATA2 query options. All fields are returned if no $select option is provided. Entries are always returned in chronological order, with the last entry being for the most recent day.

This report does not support the $orderby option.

Name

WCF Type*

EDM Type*

[In/Out]** Description

Example values

Added in service version

ActiveMailboxes

long

Edm.Int64

[In/Out] The number of Office 365 mailboxes active at the time of the report.

265

2013-V1

Date

System.DateTime

Edm.DateTime

[In/Out] The date and time of the report entry. See the "Remarks" section for information about using this field.

Short Date (for example, 03/10/2013) or Date Time with quotes (for example, "03/10/2013 4:55 PM")

2013-V1

InactiveMailboxes31To60Days

long

Edm.Int64

[In/Out] The number of Office 365 mailboxes that have not been accessed in the last 31 to 60 days.

234

2013-V1

InactiveMailboxes61To90Days

long

Edm.Int64

[In/Out] The number of Office 365 mailboxes that have not been accessed in the last 61 to 90 days.

22

2013-V1

InactiveMailboxes91To1460Days

long

Edm.Int64

[In/Out] The number of Office 365 mailboxes that have not been accessed in the last 91 to 1460 days (4 years).

4

2013-V1

TenantGuid

System.guid

Edm.Guid

[In/Out] The GUID of the organization.

16a58f78-539f-47f7-b9bf-02a63867d73b

2013-V1

TenantName

string

None specified

[In/Out] The domain name of the organization.

example.onmicrosoft.com

2013-V1

*The WCF Type refers to the .NET Framework data type assigned to the field when you create a Windows Communication Foundation (WCF) Service Reference in Visual Studio. The EDM Type refers to the ADO.NET Entity Data Model (EDM) types returned in Atom-formatted reports.

**For information about the [In/Out] indicators, see the "Input parameters and report output columns" section.

Remarks

Each entry in the report includes several fields of metadata. For more information see Common metadata returned by the Office 365 Reporting web service.

Controlling the report period

With many of the other reports, you control the reporting time period by using the StartDate and EndDate fields. This report does not have those fields, and instead uses a single Date field to specify the single day on which to report how many mailboxes were inactive. If you do not provide a $filter option with the Date specified, the report will default to providing the previous 90 days for which there is information. With that information, you can analyze trends in the number of inactive mailboxes.

To retrieve the current count of inactive mailboxes, use yesterday's date in the $filter option. Because data is somewhat delayed into the data mart, and because the stale mailbox counts are logged when the full day is past, there will almost never be data available for "today." For example, if today is February 14, you would supply the $filter option like the following.

...$filter=Date eq datetime'2013-02-13T00:00'

To request the counts for each of the last 14 days (assuming today is February 14, 2013), use the following.

...$filter=Date ge datetime'2013-02-01T00:00'

The StaleMailbox report supports the $top option as well. To specify a particular time period, use both options. The following returns the stale mailbox counts as they were during the first week of January, 2013.

...$filter=Date ge datetime'2013-01-01T00:00'&$top=7

Examples

The following request and response demonstrate how to retrieve the count of stale mailboxes that existed during the first three days of January, 2013. Line breaks were added to the request and response for clarity.

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/StaleMailbox?
  $select=Date,InactiveMailboxes31To60Days,InactiveMailboxes61To90Days,InactiveMailboxes91To1460Days&
  $filter=Date%20ge%20datetime'2013-01-01T00:00:00'&
  $top=7&
  $format=Atom
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/" 
  xmlns="http://www.w3.org/2005/Atom" \
  xmlns:d="https://schemas.microsoft.com/ado/2007/08/dataservices" 
  xmlns:m="https://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <id>https://reports.office365.com/ecp/reportingwebservice/reporting.svc/StaleMailbox</id>
  <title type="text">StaleMailbox</title>
  <updated>2013-02-10T02:55:21Z</updated>
  <link rel="self" title="StaleMailbox" href="StaleMailbox" />
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-01T00%3A00%3A00')</id>
    <category term="TenantReporting.StaleMailboxReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="StaleMailboxReport" href="StaleMailbox(datetime'2013-01-01T00%3A00%3A00')" />
    <title />
    <updated>2013-02-10T02:55:21Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-01T00:00:00</d:Date>
        <d:InactiveMailboxes31To60Days m:type="Edm.Int64">0</d:InactiveMailboxes31To60Days>
        <d:InactiveMailboxes61To90Days m:type="Edm.Int64">0</d:InactiveMailboxes61To90Days>
        <d:InactiveMailboxes91To1460Days m:type="Edm.Int64">2</d:InactiveMailboxes91To1460Days>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-02T00%3A00%3A00')</id>
    <category term="TenantReporting.StaleMailboxReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="StaleMailboxReport" href="StaleMailbox(datetime'2013-01-02T00%3A00%3A00')" />
    <title />
    <updated>2013-02-10T02:55:21Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-02T00:00:00</d:Date>
        <d:InactiveMailboxes31To60Days m:type="Edm.Int64">0</d:InactiveMailboxes31To60Days>
        <d:InactiveMailboxes61To90Days m:type="Edm.Int64">0</d:InactiveMailboxes61To90Days>
        <d:InactiveMailboxes91To1460Days m:type="Edm.Int64">2</d:InactiveMailboxes91To1460Days>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-03T00%3A00%3A00')</id>
    <category term="TenantReporting.StaleMailboxReport" 
      scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" title="StaleMailboxReport" href="StaleMailbox(datetime'2013-01-03T00%3A00%3A00')" />
    <title />
    <updated>2013-02-10T02:55:21Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:Date m:type="Edm.DateTime">2013-01-03T00:00:00</d:Date>
        <d:InactiveMailboxes31To60Days m:type="Edm.Int64">0</d:InactiveMailboxes31To60Days>
        <d:InactiveMailboxes61To90Days m:type="Edm.Int64">0</d:InactiveMailboxes61To90Days>
        <d:InactiveMailboxes91To1460Days m:type="Edm.Int64">2</d:InactiveMailboxes91To1460Days>
      </m:properties>
    </content>
  </entry>
</feed>

The following code sample shows the results of the same query, in JSON format.

  {
    "d":
      [
          {
            "__metadata":
              {
                "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-01T00%3A00%3A00')",
                "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-01T00%3A00%3A00')",
                "type":"TenantReporting.StaleMailboxReport"
              },
            "Date":"\/Date(1356998400000)\/",
            "InactiveMailboxes31To60Days":"0",
            "InactiveMailboxes61To90Days":"0",
            "InactiveMailboxes91To1460Days":"2"
          },
          {
            "__metadata":
              {
                "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-02T00%3A00%3A00')",
                "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-02T00%3A00%3A00')",
                "type":"TenantReporting.StaleMailboxReport"
              },
            "Date":"\/Date(1357084800000)\/",
            "InactiveMailboxes31To60Days":"0",
            "InactiveMailboxes61To90Days":"0",
            "InactiveMailboxes91To1460Days":"2"
          },
          {
            "__metadata":
              {
                "id":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-03T00%3A00%3A00')",
                "uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailbox(datetime'2013-01-03T00%3A00%3A00')",
                "type":"TenantReporting.StaleMailboxReport"
              },
            "Date":"\/Date(1357171200000)\/",
            "InactiveMailboxes31To60Days":"0",
            "InactiveMailboxes61To90Days":"0",
            "InactiveMailboxes91To1460Days":"2"
          }
      ]
  }

Input parameters and report output columns

The [In/Out] indicators in the fields table have the following meanings:

  • Fields marked [In] in the fields table are primarily intended for use in $filter=, $orderby=, and other query options that restrict which entries the report returns. Fields marked [In] in the fields table can be included in the $select= option, and they will appear in the report entries, but they will contain no useful data.

  • Fields marked [In/Out] in the fields table can be used in both the column selection ($select=) and entry restriction ($filter=) options. When you include one of these fields in the $select= option, it will appear in the report entries, and will contain useful data when it is available.

    As noted earlier, this report does not support the $orderby option.

Compatibility

The StaleMailbox report was introduced in Office 365 service version 2013-V1. For more information on versioning, see Versioning in the Office 365 Reporting web service.

Corresponding Windows PowerShell cmdlets

The StaleMailbox report returns the same information as the Get-StaleMailboxReport Windows PowerShell cmdlet.

Note

This cmdlet is deprecated. We don’t recommend that you use it in your production environment.

Permissions

The account you use to access the reports must have administrative permissions in the Office 365 organization. If the account can view this report in the Office 365 Control Panel, then the account has permissions to retrieve the data from the REST web service. This report requires the user to be assigned to the View-Only Recipients role. In the default Office 365 permissions structure, users with the following administrator permissions can access this report: billing administrator, global administrator, password administrator, service administrator, and user management administrator. For more information, see MailboxUsage report.

Data granularity, persistence, and availability

Information available through this report is collected once per day.

The information for this report is available for a period of one year, or until the subscription is canceled.

Events may be delayed by up to 24 hours before they appear in a report.