Search code examples
google-apigoogle-calendar-apigoogle-api-clientgoogle-api-dotnet-client

How to get the real owner of a CalendarListEntry in Google Calendar API to distinguish between owned and shared calendars?


The CalendarList entries returned by Google Calendar API v3 contain a accessRole property. However, the owner value in this property simply represents the owner "role" in terms of ACL, which in Google's web interface maps to the role "Make changes and mange sharing" when sharing a calendar.

But clearly there is a true, account owner for each calendar. This owner cannot be modified by other shared "owners", and this is the only kind of property that would allow us to distinguish between a truly "owned" calendar vs. a calendar shared by others but granted "owner" role, when accessing a user's CalendarList.

Google's own web GUI shows this value under calendar settings. It can be seen in both the true owner and shared owner's account.

But I cannot find a way to obtain this value via API. Without it, I cannot retrieve only self-owned calendars of a user, which is what I'm trying to do in my app.

Any idea if this is possible at all, or just a limitation of Google API?


Solution

  • From the point of view of Google Calendar API any user that

    can read and modify events and access control lists

    is a calendar owner.

    This is different from the calendar creator.

    Currently there is not API endpoint to retrieve the latter, but you can file a feature request for it on Google's Issue Tracker.