microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Get-MgDirectoryDeletedItem does not return DeletedDateTime property value
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
When running the following command, only 4 fields appear to be populated with data:
- DisplayName
- Id
- 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
- Execute
Get-MgDirectoryDeletedItem | Get-Member, confirm that the DeletedDateTime property exists - Execute
Get-MgDirectoryDeletedItem -All | Select-Object DisplayName, Id, Mail, DeletedDateTime - 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_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running Get-MgDirectoryDeletedItem -All | Select-Object DisplayName, Id, Mail, DeletedDateTime and compare its output with Invoke-GraphRequest, the stated workaround. Check how the Get-MgDirectoryDeletedItem response exposes DeletedDateTime and verify the property is populated while preserving the documented reproduction steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100