I am trying to read a user calendar with a service account. The userโs calendar is shared with the service account using an AccessRole โreaderโ. However, when I open the calendar of any user, it always opens as "FreeBusyReader":
First, I add the user to the calendar list (I got the impression that he works better when he is on the list, I donโt know if this is really necessary):
Dim Calendar As CalendarListEntry Calendar = service.CalendarList().Insert(" user@domain.com ").Execute()
Then I check the access role with:
Calendar.AccessRole
And it always returns "FreeBusyReader".
This also matches the results in the query:
Dim requeust As ListRequest = service.Events.List("<email address>") requeust.MaxResults = 99 requeust.TimeMin = DateTime.Now.ToString(dateFormat) requeust.TimeMax = DateTime.Now.AddDays(fetchtimespan).ToString(dateFormat) requeust.ShowDeleted = True requeust.SingleEvents = True
returns a list of records, but without a summary, and the list of events also has the same AccessRole.
What I did with the user was to share the calendar with the email address of the service users ( xxx@developer.gserviceaccount.com ), I also checked this through the API.
Any ideas?
Philipp
source share