While Creating a new folder in a drive, got Invalid Request. Microsoft.Graph.Models.ODataErrors.ODataError: One of the provided arguments is not acceptable.

Ramana Reddy Chamakura 0 Reputation points
2024-05-28T14:45:50.0566667+00:00

I was trying the example from the url: https://learn.microsoft.com/en-us/graph/api/driveitem-post-children?view=graph-rest-1.0&tabs=cli

to create a folder in the drive.

I have a registered app with following Admin Granted permissions :

App Permissions

When executing getting the issue:

Invalid Request. Microsoft.Graph.Models.ODataErrors.ODataError: One of the provided arguments is not acceptable.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,565 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 3,620 Reputation points Microsoft External Staff
    2024-05-28T17:13:13.5366667+00:00

    Hello @Ramana Reddy Chamakura ,

    Thank you for contacting Microsoft Support.

    I have successfully implemented the example from the documentation using Postman and received the response. However, you mentioned that you are using application permissions, while the documentation's example can only be implemented with delegated permissions. Please replace '/me' with '/users/{user-id}' and refer to the screenshot below.

    createfolder

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  2. Benjamin Becker 0 Reputation points
    2025-01-15T14:34:43.8233333+00:00

    I have the same problem and I use the same code for creating a sub folder in a SharePoint library, but I receive only the 400-Invalid Request error. I can read everything in the library, but I can't create a new folder. Is there a solution for this issue.

    0 comments No comments

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.