문제

I am writing an application using the Google calendar .Net v3 api that creates/edits/deletes calendar events using a service account - everything works great so far. One rule we have is that users are added manually to calendars and given "see all event details" permission. To create an event they must go through our application and have the service account create the calendar event. They cannot simply open the calendar and create an event in the normal way because they have view-only permission.

If the user has not been added to a calendar then I need a way to know that. How can I retrieve the list of users added to a calendar?

도움이 되었습니까?

해결책

There's no way to see who has the calendar in their CalendarList unless you're able to authenticate as each user (as would be the case if this app is internal to your domain and you're using an OAuth 2.0 Service Account to access all users).

You can however use acl.list() to determine what users/groups have access to a given calendar. Having access does not necessarily imply that the user has the calendar in their list of calendars and if the calendar is shared publically or with a group, the user may not be explicitly listed in the ACLs even though they have the calendar in their list.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top