question

Amoletto-8887 avatar image
0 Votes"
Amoletto-8887 asked WendyLi-MSFT edited

How to use Onedrive API on ASP.NET?

I manage the asp.net webform website.

I need the ability to upload from our website to Onedrive.

So, I'm going to make a page where I can upload to Onedrive.

use asp.net webform (not mvc, core).

Looking for relevant examples.(use onedrive API on ASP.NET webform)

I need a detailed explanation because I'm a beginner.

Thank you.

dotnet-aspnet-webforms
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Amoletto-8887,
Are you using Azure AD to get the instance to OneDrive via the Microsoft Graph API?
To use the OneDrive API via Microsoft Graph, you need to have an access token that authorizes your app with a particular set of permissions for a user.
https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online
You can refer to this document on uploading files using asp.net webform.
https://docs.microsoft.com/en-us/troubleshoot/developer/webapps/aspnet/development/upload-file-to-web-site
Maybe you can refer to this example.
Best regards,
Lan Huang


0 Votes 0 ·

0 Answers