I'm building a Windows service that will run in a customer network.
This service should upload files to some SharePoint Online document library.
I'm struggling about authentication.
I could store the user/password of a fake user in the tenant in my service configuration, but I don't like the idea of storing user credentials.
I'm trying to understand alternatives. As far as I understand, I may be able to create some app to get an AppId and a secret. I created one in My apps page, but I didn't found how to setup my ClientContext
(or rest call) to use these values.
I also didn't found how to grant this application permission in specific libraries in my tenant.
All other documentation I found relate to Addin development.
Everything is mixing in my head.
What is the correct way to grant a windows service permission to some SP365 site ?