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

Add parameter "Allowexternal" in cmdlet "Invoke-MgGraphDrive"

Open fz0000 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe the problem.

In Gragh Explorer I can send the request https://graph.microsoft.com/v1.0/me/drive/sharedWithMe?allowexternal=true to get the files shared with me. And the code in the Code snippets is:

Invoke-MgGraphDrive -DriveId $driveId -Allowexternal true 

But I will get the following error if I use the command:

Invoke-MgGraphDrive : A parameter cannot be found that matches parameter name 'Allowexternal'.
At line:1 char:39
+ Invoke-MgGraphDrive -DriveId $driveId -Allowexternal true
+                                       ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-MgGraphDrive], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Invoke-MgGraphDrive

Describe the solution you'd like.

We will appreciate it if you could add it. Or, if I used the incorrect cmdlet/parameter, please let me know. Thanks.

Additional context?

No response

fz0000 avatar Jul 24 '24 11:07 fz0000

@fz0000 thanks for reporting this issue. We are working to resolve the metadata issue.

timayabi2020 avatar Jul 25 '24 09:07 timayabi2020

@fz0000 after investigations, this issue cannot be resolved only at metadata level because the service owner hasn't provided certain metadata annotations to have the parameter included.

Image Please open an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.

Meanwhile you can use Invoke-MgGraphRequest cmdlet. i.e ``Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/v1.0//sites/{siteId}/pages/{pageId}/microsoft.graph.sitePage/publish" -Method POST -OutputType HashTable`

timayabi2020 avatar Feb 11 '25 13:02 timayabi2020