{
"attachments": [
{
"contentType": "image/*",
"contentUrl": "https://smba.trafficmanager.net/de/0f6e ... s/original"
},
{
"contentType": "text/html",
"content": "
"
}
],
"type": "message",
"timestamp": "2025-03-13T10:32:32.4231917Z",
"localTimestamp": "2025-03-13T11:32:32.4231917+01:00",
"id": "1741861952394",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/de/0f6e ... 439e40b1f/",
"from": {
"id": "29:1lS78FUfVVN2WkvaLn8Fls8zpmivS9RxWo974AOv2tRCx31YGchqABn5FeHxzSCm-3n6HdgjDOVCiuxl-Za80qg",
"name": "Test User",
"aadObjectId": "33b192a6-0216-47-14599fe0f26a"
},
"conversation": {
"conversationType": "personal",
"tenantId": "0f6e1639-5b36-450e-95e3-1f",
"id": "a:1QeVDpdUTPxM_fRgWx3QMckI6mGhTRST6_lBlM1qGRSfiJOJVPCpJ0XKaS3frJEZOcGeo7nyEDWsb0b_hXUXeURwhSGLIqEZfQxlYg1k7pMtZ"
},
"recipient": {
"id": "28:a2670ec4-57d7-4012-9e45-858e",
"name": "TestBot"
},
"entities": [
{
"locale": "en-US",
"country": "US",
"platform": "Android",
"timezone": "Europe/Berlin",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "0f6e1639-5b36-450e-95e3-ee40b1f"
}
},
"locale": "en-US",
"localTimezone": "Europe/Berlin"
}
< /code>
Dann kann ich normalerweise auf das Foto zugreifen und es weiter verarbeiten.{
"type": "message",
"timestamp": "2025-03-13T10:30:33.8343393Z",
"localTimestamp": "2025-03-13T11:30:33.8343393+01:00",
"id": "174133798",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/de/0f6e ... -95e3-eff/",
"from": {
"id": "29:1lS78FUfVVN2WkvaLn8F5FeHxzSCm-3n6Hdgxl-Za80qg",
"name": "Test User",
"aadObjectId": "33b192a6-0216-4a96-a467-145926a"
},
"conversation": {
"conversationType": "personal",
"tenantId": "0f6e1639-5b36-450e-95e3-ef5439e40b1f",
"id": "a:1QeVDpdUTPxM_fRgWx3QMckIVkunJLFyCAOcC_lBlM1qGRSfiJOJVOcGeo7nyEDWsb0b_hXUxlYg1k7pMtZ"
},
"recipient": {
"id": "28:a2ec4-57d7-4012-9e45-8b48e",
"name": "Test Bot"
},
"entities": [
{
"locale": "en-US",
"country": "US",
"platform": "Android",
"timezone": "Europe/Berlin",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "0f6e1639-5b36-450e-95e3-ef5"
}
},
"locale": "en-US",
"localTimezone": "Europe/Berlin"
}
< /code>
und ich bekomme: < /p>
{"error":{"code":"BotError","message":"Access Forbidden"}}
< /code>
und 403. < /p>
Hatte jemand etwas Ähnliches? Ich habe festgestellt, dass beim Verwenden von Anhänge die Leitungen der Dateien in meine SharePoint -URL weitergeladen wird, was bei direkt hochgeladenen Fotos nicht der Fall ist.using (HttpClient httpClient = new HttpClient())
{
var token = await new MicrosoftAppCredentials("MYAPPID", "MYAPPSECRET").GetTokenAsync();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var responseMessage = await httpClient.GetAsync(url); // here url is like https://smba.trafficmanager.net/de/...
var contentLenghtBytes = responseMessage.Content.Headers.ContentLength;
if (responseMessage.StatusCode == System.Net.HttpStatusCode.OK)
{
Console.WriteLine("Done with status '" + responseMessage.StatusCode + "'");
}
}
< /code>
Es sollte einfach sein, wenn ich eine URL des Bildes habe und das Token benutze, sollte ich in der Lage sein, es zu bekommen. Aber wie gesagt, die URL ist anders, wenn das Foto direkt von der Kamera aufgenommen wird. (Vergleich mit einem mit Anhang, bei dem wir SharePoint -URL haben).