简体   繁体   English

尝试使用Microsoft Graph API获取Office 365帐户的联系人

[英]Trying to get Contacts for an Office 365 account using Microsoft Graph API

I am trying to retrieve a list of contacts for an Office 365 account using the Microsoft Graph API. 我正在尝试使用Microsoft Graph API检索Office 365帐户的联系人列表。 When I sign in using a hotmail account, everything works. 当我使用Hotmail帐户登录时,一切正常。 However, if I use an Office 365 account I get the following response error after calling " https://graph.microsoft.com/beta/me/contacts " 但是,如果我使用Office 365帐户,则在调用“ https://graph.microsoft.com/beta/me/contacts ”后会收到以下响应错误

{
  "error": {
    "code": "ErrorInvalidUser",
    "message": "The requested user 'xxxxxx@xxxxxxxx.com' is invalid.",
    "innerError": {
      "request-id": "f03da31a-a0d0-4095-9423-8992560c9b26",
      "date": "2017-08-09T20:37:16"
    }
  }
}

I have tried searching for the error on Google but I am unable to find any information that will tell me why Office 365 accounts don't work. 我尝试在Google上搜索错误,但找不到任何信息可以告诉我Office 365帐户为何不起作用。 Any help would be greatly appreciated. 任何帮助将不胜感激。

It looks your 'xxxxxx@xxxxxxxx.com' is used with both a "Work or school account" and a "Personal account". 看来您的“ xxxxxx@xxxxxxxx.com”已与“工作或学校帐户”和“个人帐户”一起使用。 You need to sign in with your Office 365/"Work or school account" to access its mail or contacts. 您需要使用Office 365 /“工作或学校帐户”登录才能访问其邮件或联系人。 The failed request was made with a token issued for a Personal account that uses the same email address as its identifier as your Office 365 account. 失败的请求是使用为个人帐户发行的令牌发出的,该令牌使用与您的Office 365帐户相同的电子邮件地址作为其标识符。 When signing in to our test app ( https://developer.microsoft.com/en-us/graph/graph-explorer ) you would be asked which account to want to use. 登录我们的测试应用程序( https://developer.microsoft.com/en-us/graph/graph-explorer )时,系统会询问您要使用哪个帐户。 The /beta/me/contacts request should work if you choose "Work or school account", but not when you choose "Personal account" (for that email address). 如果您选择“工作或学校帐户”,那么/ beta / me / contacts请求应该可以工作,但选择“个人帐户”(对于该电子邮件地址)则无效。

暂无
暂无

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

相关问题 如何使用 Microsoft Graph Api 获取 Office 365 的邮件大小? - How to get the message size of Office 365 using Microsoft Graph Api? 如何从Microsoft Graph API for Office 365获取国家/地区? - How to get country from Microsoft Graph API for Office 365? 如何使用 Microsoft Graph API 获取 Office365 邮件的 MIME 内容? - How to get MIME content of Office365 mail using Microsoft Graph API? 如果为Office 365租户禁用了办公图,Microsoft Graph API是否可以工作? - Will Microsoft Graph API work if office graph is disabled for the Office 365 tenant? 尝试使用Microsoft Graph API v1.0查询用户的office365个人资料照片时获取“ErrorAccessDenied” - Getting “ErrorAccessDenied” while trying to query for a user's office365 profile photo using Microsoft Graph API v1.0 Microsoft Graph API office 365:是否可以从 Graph 中获取邮件 MIME 类型 - Microsoft Graph API office 365 : Is it possible to get Mail MIME type from the Graph 仅通过一个帐户使用Office 365 API - Using Office 365 API with only one account 使用服务主体登录Microsoft Graph / Office 365 REST API - Microsoft Graph / Office 365 REST API login with service principal Microsoft Graph - Office 365 API,获取有关邮箱的信息 - Microsoft Graph - Office 365 API , Obtain Information about mailbox 使用 Microsoft Graph API 显示 Office 365 用户即将到来的生日列表 - Display a list of upcoming birthdays of Office 365 users using Microsoft Graph API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM