0
我想要使用Microsoft Graph API從ContactFolder
獲取聯繫人列表。ContactFolder中的聯繫人列表
我使用的代碼如下:
GraphServiceClient graphClient = new GraphServiceClient (new CustomAuthentication());
// build the request
var request = graphClient.Me.ContactFolders.Request();
// get all contact folders
var folders = await request.GetAsync();
// get the first folder
var folder = folders.FirstOrDefault();
// get all contacts in that folder (Contacts is always null)
var contacts = folder.Contacts.ToList();
在最後一行,則Contacts
集合爲null即使通過Outlook查看時是該文件夾中的聯繫人。
席力圖召folder.Contacts.GetAsync(),但是該方法不會出現可用:
任何幫助,將不勝感激。
我試過了,但該文件夾對象的聯繫人屬性不會有GetAsync方法。我能錯過什麼嗎?我更新了我的問題,並試圖在Contacts屬性上調用GetAsync。 – Trev
更多信息您可以給我嗎? – Trev