Graph API - HttpClient returns 404, but curl (and Graph Explorer) for same request works?
I'm completely lost. I've resorted to just calling curl from C# as this is completely non-sensical to me. I started with using the Graph SDK, which I had multiple issues with, and I also received a "Not Found" error when trying to use graphClient.Groups[groupId].Threads[ThreadId].PostAsync(body) My current code looks like this:
and when I run the generated curl command... it works? Exact same url, exact same token, exact same content type... but curl (and Graph Explorer) works, and HttpClient doesn't? What in the world am I missing?
1 Reply
Ok, well, it seems like it was an issue related to timing...
The Graph API will return a conversationThreadId immediately on creation, but it can take up to 2 minutes (from my testing) before the replies can be posted. From my testing only ~10 out of ~2000 replies needed to wait the full 2 minutes. Many worked immediately, some needed 15 seconds, others needed 1 minute.
It would've been great if I didn't need to go through all of this manual effort to figure this out...