Servizio di hosting e sincronizzazione di file Microsoft.
(I will answer you in English based on your previous message. As a friendly suggestion, posting in Italian may help your question reach a wider audience and increase the chances of receiving assistance from other community members.)
Hi, @Valerio Borg
Short version: yes, you can do this without paying for Azure or Microsoft 365 Business, but you still need a tenant to hold the app registration, and right now there is no standalone "just give me an empty Entra tenant" sign-up for personal accounts. The AADSTS16000 error is expected: a personal account by itself only lands in the "Microsoft Services" placeholder tenant, which can't host app registrations. Also, the Developer Program sandbox is now limited to Visual Studio subscribers and partners, so that door is closed for most individuals.
The two official ways to get a free tenant are:
Azure free account. Even though the sign-up failed for you once, try again in an InPrivate window with your personal account, and make sure your card and billing address match your Microsoft account info. The tenant gets created during Azure sign-up, and Entra ID Free is all you need. App registrations themselves cost nothing.
Microsoft 365 Business Basic one-month trial. Sign up at the business page with any email, and it creates a work account plus a brand-new tenant. Cancel the trial before it bills; the tenant and your app registration stay usable on the free Entra tier afterwards.
Once you have a tenant, go to entra.microsoft.com, Entra ID > App registrations > New registration. Under "Supported account types" pick "Personal Microsoft accounts only." Add a Web redirect URI pointing at your hosted service, then create a client secret under Certificates & secrets. Under API permissions add Microsoft Graph delegated Files.ReadWrite and offline_access (admin consent isn't needed for these).
For authentication, use the OAuth 2.0 authorization code flow against https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize and /token. You sign in once in a browser with your personal account and consent; your server then stores the refresh token.
To your last question: yes, a cloud-hosted service works fine with no PC involved. Refresh tokens last 90 days by default and a new one is issued each time you use it, so as long as your service runs at least once in 90 days and always saves the newest token, it will keep going. If you change your password, you'll have to sign in once more.
Hope that gets you unblocked.