question

MaximilianoBertoli-2614 avatar image
0 Votes"
MaximilianoBertoli-2614 asked Bruce-SqlWork edited

Use API into a WebApi project

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?

dotnet-aspnet-core-webapi
· 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.

II doubt that you are going to find any tutorial concerning this. I don't see why the WebAPI cannot login with required credentials and use the application.

You should be able to find WebAPI file upload/download examples.

0 Votes 0 ·

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered Bruce-SqlWork edited

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://docs.microsoft.com/en-us/graph/auth-v2-service


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.