图 API 响应:无法在类型 'Microsoft.OutlookServices.Contact' 上找到名为 'telephoneNumber' 的 属性

Graph API Response: Could not find a property named 'telephoneNumber' on type 'Microsoft.OutlookServices.Contact'

我收到 API 电话的回复 "Could not find a property named 'telephoneNumber' on type 'Microsoft.OutlookServices.Contact'"。

我尝试过其他工作正常的字段,例如 jobTitle,在此列表中: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/api/entity-and-complex-type-reference

我的 API 呼叫使用不记名令牌并采用以下格式:

https://graph.microsoft.com/v1.0/users/{{MY CONTACT ID}}/contactFolders/{{ FOLDER ID HERE}}/contacts?$select=displayName,fileAs,emailAddresses,businessPhones,mobilePhone,homePhones,department,telephoneNumber&top=999

我希望 telephoneNumber 成为响应的一部分,但我收到了一个错误。

您调用的API是Microsoft GraphAPI(https://graph.microsoft.com),您提供的link是Microsoft Graph中的Contact Entity in Azure AD Graph API(https://graph.windows.net). The two APIs are different, difference . In your case, you need to check contact resource type,显然,没有 telephoneNumber 属性.