microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
691 stars 165 forks source link

Get-MgDriveListItem return bad id #2489

Open pavelxn1 opened 9 months ago

pavelxn1 commented 9 months ago

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

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.

timayabi2020 commented 8 months ago

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
pavelxn1 commented 8 months ago

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: @.***>