【发布时间】:2015-12-09 02:13:04
【问题描述】:
我想使用https://outlook.office.com/Mail.Read 和https://outlook.office.com/calendars.read 这两个范围来读取经过身份验证的用户的电子邮件和日历。我按照official .Net (WPF) tutorial 对用户进行身份验证并获取令牌。只要我的范围只是上述范围之一,它就可以很好地工作。一旦我同时使用两者,当我尝试获取它时,我就不会取回它。
这基本上就是我所做的:
private static string[] scopes = { "https://outlook.office.com/Mail.Read", "https://outlook.office.com/calendars.read" };
// sign-in/authenticate logic (with PromptBehavior.Always/Never) from tutorial
// here, the result doesn't contain a token:
result = await authContext.AcquireTokenAsync(scopes, null, clientId, redirectUri, new PlatformParameters(PromptBehavior.Always, null));
我做错了什么?
【问题讨论】:
标签: office365 office365api outlook-restapi microsoft-graph-api office365-restapi