MicroSoft Graph API suddenly answeres with BadRequest when trying to uploading file (worked before 2022-09-23)

Christian Bartels 26 Reputation points
2022-09-26T10:08:29.96+00:00

Hi,

since 2022-09-23 afternoon between 11:00 and 15:00 UTC the Graph API answeres with a HTTP 400 saying:

{"error":{"code":"BadRequest","message":"The type 'Edm.Stream' is not valid for $select or $expand, only structured types are allowed.","innerError":{"date":"2022-09-26T09:58:56","request-
id":"407b75a0-5e2a-453c-bfef-ebd2720d0dac","client-request-id":"407b75a0-5e2a-453c-bfef-ebd2720d0dac"}}}

Could you please investigate? Nothing changed on our side.. it just stopped working since then!

Kind regards,

Christian

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
0 comments No comments
{count} vote

Accepted answer
  1. Tong Zhang_MSFT 9,141 Reputation points
    2022-09-27T02:18:54.1+00:00

    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:

    244964-image.png

    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.


    0 comments No comments

0 additional answers

Sort by: Most helpful