C# 无法连接到其他用户';s office 365邮箱使用EWS API

C# 无法连接到其他用户';s office 365邮箱使用EWS API,c#,office365,exchangewebservices,C#,Office365,Exchangewebservices,有一个用户a对用户B的邮箱拥有完全访问权限,但从EWS api,用户a无法连接到B的邮箱。 如果我以用户身份从OWAA登录并打开B的邮箱,我就可以打开它。 还有其他users C、D…和A对他们的邮箱也有完全访问权限,我可以成功连接到他们的邮箱 代码如下: var folderView = new FolderView(20, 0) { PropertySet = new PropertySet(BasePropertySet.IdOnly) {

有一个用户a用户B的邮箱拥有完全访问权限,但从EWS api,用户a无法连接到B的邮箱。 如果我以用户身份从OWAA登录并打开B的邮箱,我就可以打开它。 还有其他users C、D…和A对他们的邮箱也有完全访问权限,我可以成功连接到他们的邮箱

代码如下:

    var folderView = new FolderView(20, 0)
    {
        PropertySet = new PropertySet(BasePropertySet.IdOnly)
        {
            FolderSchema.DisplayName,
            FolderSchema.ChildFolderCount
        },
        Traversal = FolderTraversal.Shallow
    };

    var mailbox = new Mailbox(B);
    var rootFolderId = new FolderId(WellKnownFolderName.Root, mailbox);

    FindFoldersResults findFolderResults;
    findFolderResults = exchangeService.FindFolders(rootFolderId, folderView);
    var count = findFolderResults.TotalCount; // This count is always 0 for user B

有错误吗?您是否进行了跟踪以查看请求和响应?如果发生错误,是否应该出现异常?