I'm writing a windows service application, the app can run in background monthes without user interaction, I want that this app will upload files to OneDrive using Microsoft.Graph api. I know how to sign in from code and also succeded to upload files.
I started with simple console app, when I sign in there is some Windows's window that askes user name and password, and after that I'm filling the user name and password I'm getting some token from the server response. the token experis after like an hour.
how can I make the token be relevat for long time, like monthes, my goal is that I don't want to sign in in the windows's window every time.