Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Microsoft graph api 发送带有附件的邮件时无法处理请求(Microsoft Team Graph API)_Microsoft Graph Api - Fatal编程技术网

Microsoft graph api 发送带有附件的邮件时无法处理请求(Microsoft Team Graph API)

Microsoft graph api 发送带有附件的邮件时无法处理请求(Microsoft Team Graph API),microsoft-graph-api,Microsoft Graph Api,嗨,当我在团队频道上发送消息时,每当我将文件附加到聊天信息时,我都会遇到上述错误。无论如何,我正在使用团队路径。下面是我的示例代码 我错过了什么吗 //数据中文件的Base64编码 byte[]bytes=System.IO.File.ReadAllBytes(ContentUrl); 字符串文件=Convert.ToBase64String(字节); //创建频道聊天信息对象 var chatMessage=new chatMessage() { Subject=null, Body=新项目B

嗨,当我在团队频道上发送消息时,每当我将文件附加到聊天信息时,我都会遇到上述错误。无论如何,我正在使用团队路径。下面是我的示例代码

我错过了什么吗

//数据中文件的Base64编码
byte[]bytes=System.IO.File.ReadAllBytes(ContentUrl);
字符串文件=Convert.ToBase64String(字节);
//创建频道聊天信息对象
var chatMessage=new chatMessage()
{
Subject=null,
Body=新项目Body
{
ContentType=BodyType.Html,
Content=constructedMsg
},
附件=新列表()
{
新聊天信息附件
{
ContentType=“image/jpeg”,
ContentUrl=文件,
Content=null,
Name=null,
ThumbnailUrl=null
}
}
};
等待_graphClient.Teams[teamId].Channels[channelId].Messages.Request().AddAsync(chatMessage);
Code: BadRequest
Message: Failed to process request.
Inner error:
    AdditionalData:
    request-id: 768916ef-e040-42eb-aaa3-9ac5745f9224
    date: 2020-02-27T08:01:48
ClientRequestId: 768916ef-e040-42eb-aaa3-9ac5745f9224