I built a SaaS application that needs to retrieve all our customer's Users & Groups from Microsoft Graph daily.
The setup part can be interactive but the Microsoft Graph is not (as it is a background task on the server-side).
I have a hard time understanding which flow I should use. When I look at the list of Authentication flows (https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows), I see naturally the Client credentials flow recommended for daemons apps. However, the drawback seems the setup complexity. The administrator needs to manually register an app, generate the secret, etc. which I would like to avoid.
On the other hand, I see the other flows (Authorization code, etc.) where there is a very streamlined authentication process. It seems that I can store on the backend side the refresh token and use it from the backend in a daemonize way. It seems to be the best of both worlds. Is this pattern correct? Is it reliable?
Note: My SaaS has a UI and users can log in to it during the setup part.