Hi @Christian Bartels ,
As far as I know, the error code 400 is usually description:
Cannot process the request because it is malformed or incorrect.
Based on your error message : "The type 'Edm.Stream' is not valid for $select or $expand, only structured types are allowed"
, It seems that $select or $expand
does not support the type 'Edm. Stream'
,please try to do a troubleshooting, upload structured types file, and check if the error exists.
In addition, if you want to upload file to SharePoint, you can try to use the Graph API : PUT /sites/{site-id}/drive/items/{parent-id}:/{filename}:/content
And here is an example for reference:
More information for reference:
Upload or replace the contents of a DriveItem (Note: This method only supports files up to 4MB in size.)
Upload large files with an upload session
Hope it can help you. Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.