我想也不可能访问我正在调查的共享文件夹。关于获取页面的问题,只要您收到第一个请求
public static async Task<IEnumerable<MailFolder>> GetMailFolderAsync()
{
var graphClient = GetAuthenticatedClient();
var mailFolder = await graphClient.Me.MailFolders.Request().GetAsync();
var sharedMailFolder = await graphClient.Users.Request().GetAsync();
return mailFolder;
}
然后您可以查看例如mailFolder.NextPageRequest,如果它不为空,那么您可以通过执行mailFolder.NextPageRequest.GetAsync()来请求它,并且可以将它用作循环条件
while(mailfoldersCollection != null) {
// Do your stuff with items within for(var folder in mailfoldersCollection) {}
// when read all items in CurrentPage then
if (mailFolder.NextPageRequest != null) {
mailfoldersCollection = await mailFolder.NextPageRequest.GetAsync();
}