Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
786 views
in Technique[技术] by (71.8m points)

outlook - microsoft graph api v1.0 endpoint does not support adding ReferenceAttachment

Different people have reported this using different languages but it can also be reproduced using the graph explorer.

This is a rather severe issue. Not only can I not use the v1.o endpoint, If I implement this against the beta endpoint I have no idea how long it will work. It puzzles me that I found other people reporting this (on the sdks instead of on the api) from over a year ago and is still not resolved. Perhaps not much used feature...

after creating a mail try to add a reference attachment. For the v1.0 endpoint this looks something like

using v1.0 endpoint

if you execute this you get: a bad request [400] Note that the sourceUrl property does not even exist on the v1.0 resources (see https://docs.microsoft.com/en-us/graph/api/resources/referenceattachment?view=graph-rest-1.0)

{
    "error": {
        "code": "ErrorInvalidProperty",
        "message": "The property 'SourceUrl' is required when creating the entity.",
        "innerError": {
            "date": "2021-01-08T16:52:31",
            "request-id": "2b8b4c2a-0f21-4691-bebc-574a30a9973a",
            "client-request-id": "c42b7a0f-b6cb-0d7a-b461-d6ac026067a4"
        }
    }
}

Executing against the beta endpoint is possible, that one does contain the SourceUrl property, among others that are not in v1.0. (see https://docs.microsoft.com/zh-tw/graph/api/resources/referenceattachment?view=graph-rest-beta)

Try in graph explorer against beta endpoint


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...