msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Get-MgDirectoryDeletedItem does not return DeletedDateTime property value

Open Dev-Mom opened this issue 7 months ago • 0 comments

Describe the bug

When running the following command, only 4 fields appear to be populated with data:

  1. DisplayName
  2. Id
  3. Mail
  4. UserPrincipalName

Get-MgDirectoryDeletedItem -All

When I try to directly select the DeletedDateTime property, it is blank.

Get-MgDirectoryDeletedItem -All | Select-Object DisplayName, Id, Mail, DeletedDateTime

If it's not possible to populate all the object fields, could you at least populate this critical value?

See the last comments on this closed issue for another user requesting the same.

Expected behavior

DeletedDateTime property should be populated.

How to reproduce

  1. Execute Get-MgDirectoryDeletedItem | Get-Member, confirm that the DeletedDateTime property exists
  2. Execute Get-MgDirectoryDeletedItem -All | Select-Object DisplayName, Id, Mail, DeletedDateTime
  3. Confirm that the DeletedDateTime field is empty

SDK Version

2.26.1

Latest version known to work for scenario above?

No response

Known Workarounds

Invoke-GraphRequest

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Dev-Mom avatar Mar 26 '25 23:03 Dev-Mom