0
votes

I followed this document and wrote the code as below, but it response 405(method not allowed), error message is "The OData request is not supported.".

function getAttachment(groupId, threadId, postId) {
    HttpClient.get({
        url: "https://graph.microsoft.com/v1.0/groups/" + groupId + "/threads/" + threadId + "/posts/" + postId + "/attachments"
    }).then(function (resp) {

    });
};

Is there something wrong in the code?

1
Could you try the beta api instead of v1.0 ? do you get the same error. - Mostafa
Yes I did, but also got the same error message. - Jason Chang
i know this might sound odd, but since you've got an http 405 response, did you try sending a POST (or PUT, etc.) instead and see what happens? - securecodeninja
It could be that this endpoint is currently unsupported. Check the following GitHub thread for updates: github.com/OfficeDev/microsoft-graph-docs/issues/… - Waldek Mastykarz

1 Answers

1
votes

Your code is correct, it's a bug in the Graph API. A fix for it is being rolled out and should be widely available in about a month.