是否可以访问Outlook API端点以读取组邮箱的收件箱?
{"error":{"code":"OAuthMissingForThisApiVersion","message":"Authentication for this API version requires OAuth."}}
如何为该请求传递OAuth令牌?
答案 0 :(得分:2)
根据官方文档,您需要获取令牌并在请求中设置Authorization标头:
GET https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$select=subject,from,receivedDateTime&$top=25&$orderby=receivedDateTime%20DESC
Accept: application/json
Authorization: Bearer eyJ0eXAi...b66LoPVA
X-AnchorMailbox: jason@contoso.onmicrosoft.com