Skip to content

Added -OutStream to Invoke-PnPGraphMethod#2976

Merged
gautamdsheth merged 2 commits intopnp:devfrom
KoenZomers:InvokeGraphReturnStream
Apr 5, 2023
Merged

Added -OutStream to Invoke-PnPGraphMethod#2976
gautamdsheth merged 2 commits intopnp:devfrom
KoenZomers:InvokeGraphReturnStream

Conversation

@KoenZomers
Copy link
Collaborator

@KoenZomers KoenZomers commented Apr 5, 2023

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Added -OutStream to Invoke-PnPGraphMethod which allows for the response to be written to a memory stream which would allow for things such as this which will get the user profile photo of a user and in memory upload it to SharePoint Online:

Invoke-PnPGraphMethod "https://graph.microsoft.com/v1.0/users/user@contoso.com/photo/`$value" -OutStream | Add-PnPFile -FileName user.jpg -Folder "Shared Documents"

@gautamdsheth gautamdsheth merged commit 05fb0df into pnp:dev Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants