我想使用两个作用域,https://outlook.office.com/Mail.Read
并https://outlook.office.com/calendars.read
阅读经过身份验证的用户的电子邮件和日历。我按照官方的.Net(WPF)教程对用户进行身份验证并获得令牌。只要我的范围只是以上范围之一,它就可以很好地工作。两者同时使用时,我在尝试获取令牌时不会找回令牌。
这基本上就是我要做的:
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));
我究竟做错了什么?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句