StaleMailboxDetail report
Important: These reports are deprecated as of January 29, 2018. We recommend that you use the Microsoft Graph Email activity reports instead.
The StaleMailboxDetail REST URI provides detailed information about mailboxes in an Office 365 organization that have not been accessed recently. Use this report in combination with StaleMailbox report to manage inactive mailboxes.
Applies to: Office 365
REST URIs
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/StaleMailboxDetail[?ODATA options]
Fields
You can specify the following fields in the $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 the most recent.
This report does not support the $orderby option.
Name |
WCF Type* |
EDM Type* |
[In/Out]** Description |
Example values |
Added in service version |
---|---|---|---|---|---|
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 |
DaysInactive |
int |
Edm.Int32 |
The number of days that the mailbox was inactive on the day indicated in the Date field. If the user has never logged in to the mailbox, this field indicates how many days since the mailbox was created. |
25 |
2013-V1 |
LastLogin |
System.DateTime |
Edm.DateTime |
The date and time the mailbox was last accessed. If the mailbox has never been accessed, this field will be explicitly null. |
2012-09-27T16:44:57 |
2013-V1 |
TenantGuid |
System.guid |
Edm.Guid |
[In/Out] The GUID of the Office 365 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 |
UserName |
string |
None specified |
[In/Out] The display name associated with the mailbox. |
UserOne |
2013-V1 |
WindowsLiveID |
string |
None specified |
[In/Out] The Windows Live ID associated with the mailbox, in SMTP email address format. |
userone@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 details about the inactive mailbox. 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, for each inactive mailbox. With that information, you can analyze trends in the number of inactive mailboxes.
To retrieve details about the currently-inactive mailboxes, use yesterday's date in the $filter option. Because data is somewhat delayed to the data mart, and because the stale mailbox counts are logged at the end of the full day , 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 StaleMailboxDetail 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 details of the mailboxes that were inactive on January 1, 2013, in Atom XML-based format. Line breaks were added to both the request and response for clarity.
https://reports.office365.com/ecp/reportingwebservice/reporting.svc/StaleMailboxDetail?
$select=Date,DaysInactive,LastLogin,UserName,WindowsLiveID&
$filter=Date%20ge%20datetime'2013-01-01T00:00:00'&
$top=1&$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/StaleMailboxDetail</id>
<title type="text">StaleMailboxDetail</title>
<updated>2013-02-10T03:40:33Z</updated>
<link rel="self" title="StaleMailboxDetail" href="StaleMailboxDetail" />
<entry>
<id>https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')</id>
<category term="TenantReporting.StaleMailboxDetailReport"
scheme="https://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" title="StaleMailboxDetailReport" href="StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')" />
<title />
<updated>2013-02-10T03:40:33Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Date m:type="Edm.DateTime">2013-01-11T00:00:00</d:Date>
<d:WindowsLiveID>userone@example.onmicrosoft.com</d:WindowsLiveID>
<d:UserName>UserOne</d:UserName>
<d:LastLogin m:type="Edm.DateTime" m:null="true" />
<d:DaysInactive m:type="Edm.Int32">115</d:DaysInactive>
</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/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')",
"uri":"https://reports.office365.com/ecp/ReportingWebService/Reporting.svc/StaleMailboxDetail(datetime'2013-01-11T00%3A00%3A00')",
"type":"TenantReporting.StaleMailboxDetailReport"
},
"Date":"\/Date(1357862400000)\/",
"WindowsLiveID":"userone@example.onmicrosoft.com",
"UserName":"UserOne",
"LastLogin":null,
"DaysInactive":115
}
]
}
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.
As noted earlier, this report does not support the $orderby option.
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.
Compatibility
The StaleMailboxDetail 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 StaleMailboxDetail report returns the same information as the Get-StaleMailboxDetailReport 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.