0

我正在使用以下项目:https ://github.com/OfficeDev/O365-ASPNETMVC-Start

我按照文档中的要求设置了配置,但登录后收到错误消息。

Cause   Action
AdalException   This exception is thrown when either you have a stale O365 access token that can cause authentication errors, or you attempted to access a resource that you don't have permissions to access.

Make sure the app is configured with the correct service permissions in the Services Manager menu. If any of these permissions are not configured, or configured incorrectly, some parts of the app may throw an error. For example  Right click the project, select Connected Service..., and ensure the following permissions are set for this app:

(Calendar) – Have full access to users’ calendar and Read users' calendar
(Contacts) – Have full access to users’ contacts and Read users' contacts
(Mail) - Send mail as a user, Read and write access to users' mail, and Read users' mail
(Users and Groups) – Enable sign-on and read users’ profiles.

权限设置正确:

在此处输入图像描述

我怎么解决这个问题?

4

2 回答 2

0

您缺少SendMail API 下的权限。

于 2015-07-28T17:18:14.210 回答
0

我解决了这个问题...我在没有分配许可证的情况下使用开发人员帐户登录。您必须创建一个新用户并确保其将 Microsoft Office 365 开发人员设置为已分配许可证。

如果不是,则会发生此错误:

When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids.
于 2015-07-28T19:29:34.263 回答