Best way to do one-way sync from custom .net calendar to Calendar 365

I want for all my clients that use my .net core app and my custom calendar (I’m using iCal.Net nuget package and stuff) to be able to sync events from calendar to their private/work/school MS account (@live.com, @outlook.com..)

My first idea was to implement Graph API as Delegated access (user will be prompt once a while, get his token and refresh token and store it in a storage).

I created some endpoints in postman and these endpoints work (CRUD operations, create event, update event, delete event)

But now I started to investigate Application access, but as far I can understood, this flow is mean to be for those users which are on azure AD where the app is registered?

My goal is to have some kind long lived access token per client.
My clients are located in Europe, USA, Asia etc.

I want to from time to time (once per day) to have a worker, that will collect all these emails of those users which gave consent initially, and do a sync process for them to theirs Calendar365.

Should I stick with Delegated approach, keeping these tokens, getting new tokens etc, or there is some “easier” way to do this sync?

Thanks

Leave a Comment