我正在尝试使用服务帐户阅读用户日历.使用AccessRole"reader"与服务帐户共享用户的日历.但是,当我打开任何用户的日历时,它总是以"FreeBusyReader"打开:
首先,我将用户添加到日历列表中(我觉得它在列表中时效果更好,不知道是否真的需要):
Dim Calendar As CalendarListEntry
Calendar = service.CalendarList().Insert("user@domain.com").Execute()
Run Code Online (Sandbox Code Playgroud)
然后我正在检查访问角色:
Calendar.AccessRole
Run Code Online (Sandbox Code Playgroud)
它总是返回"FreeBusyReader".
这也与之后的请求中的结果相匹配:
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
Run Code Online (Sandbox Code Playgroud)
返回一个条目列表,但没有摘要,事件列表也有相同的AccessRole.
我在用户上做的是与服务用户的电子邮件地址共享日历(xxx@developer.gserviceaccount.com),我也通过API验证了.
有任何想法吗?
I had an issue today with CTEs running on SQL Server 2016, at the moment I worked around it using table variables, however I am not sure if the behavior is wrong or I am reading the documentation wrong.
When you run this query:
with cte(id) as
(
select NEWID() as id
)
select * from cte
union all
select * from cte
Run Code Online (Sandbox Code Playgroud)
I would expect two times the same guid, however there are 2 different ones. According to the …