Use API into a WebApi project

Maximiliano Bertoli 26 Reputation points
2021-05-02T02:48:01.963+00:00

I need to call Graph API without user interaction.
Users access to a Angular website through ADFS and the backend is served by .Net Core WebApi.
Users ask the server to upload/download a file and the server must "self login" to Graph and do the operations.
I can't find a tutorial for this.
Can someone help me?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,199 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,846 Reputation points
    2022-06-23T20:13:02.857+00:00

    if the webapi need to access GraphApi without a passed user token. then the webapi needs to call azure ad to get an access token. see:

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

    0 comments No comments