EWS将日历事件写入用户的日历会引发“在商店中找不到指定的文件夹”。

时间:2018-12-28 13:02:04

标签: exchange-server exchangewebservices

我正在尝试使用EWS API为有会议室的用户创建会议。当我发送以下SOAP请求时,收到错误消息“在存储中找不到指定的文件夹”。 SOAP请求是否有问题,或者在Exchange服务器上是否需要更改?

size_raw = input("Size of tree?")

def spaces(length, size):
  Space = " "
  new_len = size / 2
  new_len -= length
  space_s = int(Space) * int(new_len)
  return space_s

def segment(h, tw, bw, s):
  line = tw
  star = "*"
  while line <= bw:
    stars = line * star
    print (spaces(int(line), int(s)) + (stars) + (spaces(int(line), int(s))
    line += 2

def tree(size):
  Topwidth = 1
  height = 3
  while Topwidth <= size:
    bottom_width = Topwidth + height
    segment(int(height), int(Topwidth), int(bottom_width), int(size)
    height += 2

 if size_raw == "Very Big":
     tree(100)
 elif size_raw == "Massive":
     tree(1000)
 else:
     tree(int(size_raw))

1 个答案:

答案 0 :(得分:0)

该错误表示您无权尝试创建约会的基础日历。您可能会在描述的senerio中使用EWS Impersonation更好,因为这将使您可以作为用户(而不是代表)创建约会,请参见https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-configure-impersonation

使用代码,您应该使用Exchange2007

<SOAP-ENV:Header>
 <ns1:RequestServerVersion Version="Exchange2007"/>
</SOAP-ENV:Header>

Exchange的RTM版本具有不同的ID格式,因此我建议至少使用Exchange2007_SP1或使用您可以使用其代码的版本查看https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/ews-schema-versions-in-exchange