Graph API generated (temporary) Sharepoint download URL returns `BadRequest` for all calls

Bart Dekker 146 Reputation points
2021-07-05T11:42:10.737+00:00

Scenario: We want to download files from our company sharepoint using an API, which uses the client credentials flow. No users involved. We do this to fetch help files and content for our apps.

Issue: Since this weekend, whenever we want to download files from Sharepoint, a non specific BadRequest exception occurs.
Text: {"error":{"code":"invalidRequest","innerError":{"code":"badArgument"},"message":"One of the provided arguments is not acceptable."}}

It does not specify which arguments aren't acceptable.

The production code generates the request via the Graph API framework, using
--
111810-image.png
--

Temporary download also contains the same error,
---
111882-image.png

This doesn't work at all.
We can't find a work around.

ApiVersion=2.0

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,241 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,803 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,031 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,269 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bart Dekker 146 Reputation points
    2021-07-09T14:07:39.793+00:00

    I can confirm it's been solved, thank you for the feedback.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Martin 26 Reputation points
    2021-07-05T12:02:42.83+00:00
    3 people found this answer helpful.
    0 comments No comments

  2. Andriejus 61 Reputation points
    2021-07-05T16:23:30.583+00:00

    Also having exactly the same issue.
    Cannot figure out what's happening as the error messages aren't helpful. This functionality used to work just fine days ago.
    Can't find any relevant changes in any of the rest api or libary change logs.

    3 people found this answer helpful.
    0 comments No comments

  3. MichaelHan-MSFT 18,036 Reputation points
    2021-07-06T08:31:18.75+00:00

    Hi @Bart Dekker ,

    I have tested on my tenant. This works for me.

    Could you please share the timestamp and request id of the error for this endpoint? I would help check the log.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.