Skip to content

Get-MgDirectoryDeletedItem does not return DeletedDateTime property value #3244

@Dev-Mom

Description

@Dev-Mom

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_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions