Upload file on OneDrive in Asp.net Core Web API

Saud Khan 26 Reputation points
2022-01-26T19:29:21.5+00:00

I'm creating an API in the asp.net core to upload files on OneDrive. The workflow is that the user will make an API request with an attachment and I want to store that file into my OneDrive account but the issue is that the example code I'm familiar with does open an authentication window for users, but I don't want this because I want to store files into my OneDrive. Looking for an expert opinion. Thanks

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,208 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,309 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,931 Reputation points
    2022-01-26T20:27:17.157+00:00

    you would use app authorization with a secret

    https://learn.microsoft.com/en-us/graph/auth-v2-service