how to upload files in one drive using .net web API

ciboligi ijavima 20 Reputation points
2023-11-23T04:56:18.3633333+00:00

how to upload files in one drive using .net web API , i cannot find any proper resource for that , i have seen this to create a new folder and test it :

https://graph.microsoft.com/v1.0/me/drive/root/children

on this page Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph , still here i can test for other things like checking recent files , list of items in my drive ,
but i cannot find for uploading files .

i have created application in microsoft azure to get client , secret , tenant IDs

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,408 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
971 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 40,226 Reputation points
    2023-11-23T07:56:02.2266667+00:00

    Hi @ciboligi ijavima

    You should call the upload API to upload files to your OneDrive.

    User's image

    Hope this helps.

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