简体   繁体   English

使用GetConversationItems时,此调用方或应用程序无法使用请求的Web方法。

[英]The requested web method is unavailable to this caller or application thrown when using `GetConversationItems`

In my outlook web add-in I use Office.js's getCallbackTokenAsync to get the token before connecting to EWS in my asp.net back end. 在我的Outlook Web加载项中,在连接到asp.net后端中的EWS之前,我使用Office.js的getCallbackTokenAsync获取令牌。

ExchangeService service = new ExchangeService();
                service.Url = new Uri(mailItem.ewsUrl);
                service.Credentials = new OAuthCredentials(mailItem.ewsToken);
                PropertySet ps = new PropertySet(
                                                ItemSchema.Subject,
                                                );
                _email = EmailMessage.Bind(service, new ItemId(mailItem.itemID),ps);
//the following throws error
    ConversationResponse response = service.GetConversationItems(convId,
                                                                 properties,
                                                                 null,
                                                                 foldersToIgnore,
                                                                 ConversationSortOrder.TreeOrderDescending);

Seems like this GetConversationItems method is not allowed when I used the token retrieved by Office.js to initialize the EWS service. 当我使用Office.js检索的令牌初始化EWS服务时,似乎不允许使用这种GetConversationItems方法。 I tried to updated the manifest permission to the highest level to ReadWriteMailBox but still not working. 我试图将清单权限更新为ReadWriteMailBox的最高级别,但仍然无法正常工作。 Seems like I can only use Office.js to call EWS ? 好像我只能使用Office.js调用EWS

The token you get from getCallbackTokenAsync is only used to retrieve attachments on the current item or on the current item. 从getCallbackTokenAsync获得的令牌仅用于检索当前项目或当前项目上的附件。 For more information, please see the following link: 有关更多信息,请参见以下链接:

getCallbackTokenAsync getCallbackTokenAsync

Best Regards, 最好的祝福,

Evan 埃文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用反射时不可用的方法 - TargetInvocationError - Method unavailable when using reflection - TargetInvocationError 尝试从Web应用程序打印时出现错误“ RPC服务器不可用” - Error “The RPC server is unavailable” when trying to print from a web application 用于通知方法调用者该方法抛出的异常类型的属性 - Attribute to inform method caller of the type of exceptions thrown by that method 使用StackTrace推断方法的调用者 - Using The StackTrace To Infer The Caller Of A Method 异步等待在ContinueWith之前返回到调用方,但仅当引发异常时 - Async await returns to caller before ContinueWith, but only when exception is thrown 使用 EnableCors 时“请求的资源不支持 http 方法 'OPTIONS'” - “The requested resource does not support http method 'OPTIONS'” when using EnableCors 在Console应用程序中使用Web应用程序方法 - Using a Web application method in a Console application 域不可用时使用NegotiateStream - Using NegotiateStream when domain is unavailable 当我从远程客户端调用Web应用程序时,抛出SocketException - SocketException is thrown when i call my web application from distance client 在Web应用程序中但不在控制台中运行时,linq2db InformixDataProvider引发的类型初始化错误 - Type Initializer Error Thrown by linq2db InformixDataProvider when run in Web Application but not Console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM