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

Get-MgDriveListItem return bad id

Open pavelxn1 opened this issue 1 year ago • 2 comments

Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:

  • Make sure you can reproduce this issue using the latest released version of Microsoft.Graph or Microsoft.Graph.Beta.
  • Please search the existing issues to see if there has been a similar issue filed.
  • For issues related to authentication and service errors, please refer to our troubleshooting guide. For service issues, please open a question at https://developer.microsoft.com/graph/support.

Describe the bug

Get-MgDriveListItem returns unusable item id compare to Invoke-MgRestMethod -Uri $url -Method GET which returns usable id for command get-MgDriveItemContent -DriveId $driveID -DriveItemId $itemID -OutFile $filepath where $url = "https://graph.microsoft.com/v1.0/sites/{id}/sites/{id}/drives/{id}/root/children"

To Reproduce Steps to reproduce the behavior:

  1. Execute Get-MgDriveListItem -DriveId $driveid | select -first 1 | fl *
  2. check id value, or try use it in get-MgDriveItemContent -DriveId $driveID -DriveItemId $itemID -OutFile $filepath

Expected behavior

A clear and concise description of what you expected to happen. I'm expecting usable itemID for next PS commands

Debug Output

Run the problematic command with -Debug and paste the resulting debug stream below. ⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.

Module Version

Please run Get-Module Microsoft.Graph* after cmdlet execution and paste the output below. If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output. ModuleType Version PreRelease Name ExportedCommands


Script 2.11.0 Microsoft.Graph.Authentication {Add-MgEnvironment, Connect-MgGraph, Disconnect-MgGraph, Get-MgContext…} Script 2.11.0 Microsoft.Graph.Files {Add-MgDriveListContentTypeCopy, Add-MgDriveListContentTypeCopyFromContentTypeHub,…

Environment Data

Please run $PSVersionTable and paste the output below. If running the Docker container image, indicate the tag of the image used and the version of Docker engine. Name Value


PSVersion 7.3.6 PSEdition Core GitCommitId 7.3.6 OS Microsoft Windows 10.0.17763 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

pavelxn1 avatar Dec 12 '23 16:12 pavelxn1

Hi @pavelxn1 I was not able to reproduce the issue. See screen shot below. However, you can add -debug parameter before the pipe, extract the "request-id" from the debug information and share it with the service owner here for further troubleshooting. image

timayabi2020 avatar Dec 15 '23 15:12 timayabi2020

Hi Tim, I have similar output like you, but this id is unusable in next PS commands. Like I described in case. Have you tried to use it? Regards, Pavel

On Fri, Dec 15, 2023, 16:42 Tim @.***> wrote:

Hi @pavelxn1 https://github.com/pavelxn1 I was not able to reproduce the issue. See screen shot below. However, you can add -debug parameter before the pipe, extract the "request-id" from the debug information and share it with the service owner here https://developer.microsoft.com/en-us/graph/support for further troubleshooting. image.png (view on web) https://github.com/microsoftgraph/msgraph-sdk-powershell/assets/10947120/4a768882-bcf7-4aa4-a065-4685d4b0865c

— Reply to this email directly, view it on GitHub https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2489#issuecomment-1858082340, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEUHYNQX42FZXXHGNS3LRFTYJRVV5AVCNFSM6AAAAABARYW5JSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGA4DEMZUGA . You are receiving this because you were mentioned.Message ID: @.***>

pavelxn1 avatar Dec 18 '23 06:12 pavelxn1