【发布时间】:2016-12-16 12:05:15
【问题描述】:
我正在使用此 URL 创建 Outlook 推送通知的订阅请求:
https://outlook.office365.com/api/v2.0/me/subscriptions
我已通过 Azure AD 使用基于证书的身份验证,使用以下代码获取令牌:
AuthenticationContext authContext = new AuthenticationContext("https://login.microsoftonline.com/mytenant/oauth2/v2.0/token");
AuthenticationResult authResult = await authContext.AcquireTokenAsync("https://outlook.office365.com/", certificate);
在调用订阅 API 时,我收到一个 Forbidden 错误,响应如下:
x-ms-diagnostics: 2000008;reason="OAuth2 AccessTokens for app-only require that the target mailbox is explicitly specified with the api call";error_category="invalid_grant"
能否请您帮我解决哪里出错或如何调试/解决此错误。
提前致谢
【问题讨论】:
标签: c# azure outlook office365 office365api