Well, my problem is that I have to register the calendar in my personal google account which isn't a problem but...
When creating a new event, my personal e-mail will display there as an Organizer and will put the event in my personal calendar as well.
In the company, we use Microsoft 365 accounts which would be the best to use. I mean, is there a way to solve this?
The best way to solve this is that when I create the event, I give it a string (which is a microsoft email) and that should be the organizer (in spite of the fact that it's not a google account). The main problem is that I have to pre register the ClientID in the application to run the whole process. I use the following right now with google account:
public static CalendarService getCalendarService
{
get
{
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = clientId, ClientSecret = clientSecret },
new[] { CalendarService.Scope.Calendar }, "user", CancellationToken.None).Result;
return new CalendarService(new BaseClientService.Initializer { HttpClientInitializer = credential, ApplicationName = "Deadline calendar" });
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…