microsoftgraph / msgraph-sdk-php

Microsoft Graph Library for PHP.
Other
578 stars 144 forks source link

[Question] Get download url from DriveItem in V2 #1460

Closed flohw closed 9 months ago

flohw commented 9 months ago

Hi,

I am upgrading to the version 2 of this library. With the previous version we had access to an index @microsoft.graph.downloadUrl which seems to not be accessible anymore.

I saw #1410 but I need this downloadurl instead of the stream (which seems to be null in my case on a file) as I am building an angular application.

Is there a solution I didn't see?

I hope to not be forced to build an endpoint on my side to return that stream and there is still this info in the graph response. At least on the graph explorer with version 1, maybe the info is not here in beta, will be removed later and I am not aware of that. :thinking:

Thanks

flohw commented 9 months ago

Found...

It's here in DriveItem::getAdditionalData()['@microsoft.graph.downloadUrl']. I didn't see it because I listed only directories.

Sorry for that.