Search code examples
c#calendargoogle-apigoogle-calendar-apigoogle-apps

C#: Google Calendar API events for specific user


I'm trying to get calendar events for a specific user using Google's Calendar API.

I have managed to get user ids for the users I need using the Directory API (Admin SDK).

The problem is, that I need to retrieve the primary calendar (maybe just the id) for each user in order to get their events.


Solution

  • "Verified" solution

    The primary calendar id is the user's primary email address.

    If you are authenticated as that user, you can also use the "primary" keyword to refer to the primary user's calendar.