简体   繁体   English

使用 Azure AD 使用 Microsoft Graph 在帐户之间发送电子邮件会产生无效的 IP 错误

[英]Sending emails between accounts using Microsoft Graph using Azure AD produces invalid IP error

I registered a daemon app in Azure AD and am creating a class to do some basic things like send and delete emails but I get an error when trying to send between two @*.onmicrosoft.com email boxes.我在公元 Azure 注册了一个守护程序应用程序,并正在创建一个 class 来做一些基本的事情,比如发送和删除电子邮件,但是当我尝试在两个 @*.onmicrosoft.com email 框之间发送时出现错误。 I am able to send from Gmail to these emails for example but not between the two emails for some reason.例如,我可以从 Gmail 发送到这些电子邮件,但由于某种原因不能在两封电子邮件之间发送。

Error:错误: 错误

The way I am sending emails is as follows:我发送邮件的方式如下:

    public async Task Send(string[] to, string subject, string body, FileInfo[] attachments = null, bool saveToSentItems = true, bool isBodyHTML = false)
    {
        var msg = new Message
        {
            Subject = subject,
            Body = new ItemBody { ContentType = (isBodyHTML) ? BodyType.Html : BodyType.Text, Content = body },
            ToRecipients = to.ToList().Select(x => new Recipient() { EmailAddress = new EmailAddress { Address = x } })
        };

        await graphClient.Users[email].SendMail(msg, saveToSentItems).Request().PostAsync();
    }

So I think it's because of trial licenses and couldn't figure out way yet to turn off the IP filtering:所以我认为这是因为试用许可证并且无法找到关闭 IP 过滤的方法:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用@azure-msal-angular 进行 Microsoft AD 身份验证时出现 performanceMeasurement.startMeasurement 错误 - performanceMeasurement.startMeasurement error when using @azure-msal-angular for Microsoft AD authentication 基于 IP 地址限制对 Microsoft Graph 的访问,使用应用程序级身份验证和多租户应用程序 - Restricting access to Microsoft Graph based on IP address, using application level auth and multi-tenanted app 使用 azure 逻辑应用从共享邮箱发送 email 使用 Microsoft Graph API - Send email using Microsoft Graph API from shared mailbox using azure logic app Microsoft Azure AD SCIM 终结点 - Microsoft Azure AD SCIM endpoints Microsoft azure Bot 集成到 Teams 中,首次使用 SSO 发送响应两次 - Microsoft azure Bot integrated in Teams sending respose twice using SSO for the first time 是否可以通过 Powershell 将 Microsoft Graph 委托权限添加到 Azure AD 应用程序? - Is it possible to add Microsoft Graph delegated permissions to Azure AD app via Powershell? 使用 AWS SES v2 发送带附件的电子邮件 - Sending emails using AWS SES v2 with attachments Azure AD LDAP 来宾帐户授权 - Azure AD LDAP auth for Guest accounts 阻止具有 Azure AD 帐户的用户访问我的存储 - Prevent users with Azure AD accounts to access my storage Azure 解析 OAuth2 回调时出现 AD 错误:invalid_client - Azure AD error while parsing OAuth2 callback: invalid_client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM