Getting '409 Conflict' Trying to create contact folder
Sillas Poulsen
0
Reputation points
I am trying to programmatically create new contact folders for users in an organization. The problem arises when I attempt to create a folder—it says there's a conflict. However, I've tried to retrieve the existing contact folders right before creation, and there's no folder with the same display name. I don't understand why this conflict is happening.
var response1 = await httpClient.GetAsync(
$"https://graph.microsoft.com/v1.0/users/{userId}/contactFolders"
);
var responseString1 = await response1.Content.ReadAsStringAsync();
var response = await httpClient.PostAsync(
$"https://graph.microsoft.com/v1.0/users/{userId}/contactFolders",
content
);
var responseString = await response.Content.ReadAsStringAsync();
Thank you very much in advance,