我正在使用 CSOM 开发 SharePoint 提供程序托管的加载项,并且在使用以下方式发送电子邮件时访问被拒绝:
EmailProperties emailProperties = new EmailProperties();
emailProperties.To = emailAddresses;
emailProperties.From = "no-reply@sharepointonline.com";
emailProperties.Body = @"XXXXX";
emailProperties.Subject = viagem.Title;
Utility.SendEmail(context, emailProperties);
context.ExecuteQuery();
[ServerUnauthorizedAccessException:访问被拒绝。您无权执行此操作或访问此资源。]
Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) +2911
Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() +1564
该应用程序已经拥有一些权限:
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />
<AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="Read" />
<AppPermissionRequest Scope="http://sharepoint/bcs/connection" Right="Read" />
我有两个问题:
1-我需要添加什么权限?
2- 我正在尝试使用“no-reply@sharepointonline.com”作为发件人,因为这是工作流中用作发件人的地址。任何人都知道 SharePoint Online 中电子邮件的默认电子邮件是什么?
谢谢