question

SwapnilDave-8467 avatar image
0 Votes"
SwapnilDave-8467 asked JayceYang-MSFT edited

Microsoft Exchange Online Mailbox | MailBox Usage Details

The user after being deleted (soft deleted) appears in the response of this api getMailboxUsageDetail. Why, this user is appearing in the api response as this user is deleted.

Also, how to know if the user is soft deleted or not.

microsoft-graph-mailmicrosoft-graph-usersmicrosoft-graph-insights
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Would you please provide us with an update on the status of your issue?

0 Votes 0 ·

1 Answer

Danstan-MSFT avatar image
0 Votes"
Danstan-MSFT answered Danstan-MSFT edited

Why, this user is appearing in the API response as this user is deleted.

getMailboxUsageDetail is a usage report and once reports are generated for a period they are not deleted even when the user are deleted because they are records of usage regardless of if the user still exists or not.

Also, how to know if the user is soft deleted or not.

When a user is soft deleted, the user will be accessible under List deleted items . To check that you can do Get deleted item which returns 404 when the user is either permanently deleted or is not on soft deleted state. For example

 GET https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.user/user-id
    
 {
     "error": {
         "code": "Request_ResourceNotFound",
         "message": "Resource 'user-id' does not exist or one of its queried reference-property objects are not present.",
         "innerError": {...}
     }
 }








5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.