Exchange Web 服务 - 在未经租户管理员同意的情况下发送电子邮件?

Exchange Web Service - Sending email without tenant admin consent?

我正尝试按照此处的说明通过 EWS 发送电子邮件: Authenticate an EWS application by using OAuth。我想配置委托身份验证,已在 Azure 上注册我的应用程序,并添加了 API 权限 'EWS.AccessAsUser.All'。

App registration page

在 Azure Web UI 上,它告诉我不需要管理员同意,但是当我 运行 上述教程中的示例代码时,在行处出现异常:

var authResult = await pca.AcquireTokenInteractive(ewsScopes).ExecuteAsync();

弹出登录名window,输入用户名和密码后,显示'Need admin approval - (MyAppName) needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.'

Popup window

我是否必须为此征得管理员的同意? Azure UI 信息是否与弹出窗口所说的冲突?

谢谢!

谢谢Glen Scales。添加您的评论作为答案以帮助其他社区用户。

需要用户或管理员同意,但根据用户同意的方式 configured in your org,门户不会考虑这一点。因此,虽然用户可以同意该权限,但由于租户配置

,它不适用