.NET SDK DeleteUserAsync returns 409 Conflict on active users

Running into a wall with the Genesys Cloud .NET SDK (GenesysCloud.Platform.Api). I need to clean up test users in our staging org, but the DeleteUserAsync method keeps throwing a 409 Conflict when the user has any historical interaction data attached.

Here’s the snippet I’m using in an Azure Function:

var api = new UsersApi();
try
{
 await api.DeleteUserAsync(userId, null, null, false, null);
 Console.WriteLine($"Deleted {userId}");
}
catch (ApiException e)
{
 Console.WriteLine($"Error: {e.ErrorCode} - {e.Message}");
}

The error message says User has interactions and cannot be deleted.. The docs mention a cascadeDelete parameter, but setting it to true doesn’t seem to change anything for users with call logs or chat transcripts. I don’t want to hard-delete the interactions because we need them for audit trails, but I also can’t keep these zombie test accounts around.

Is there a way to mark the user as inactive or archived via the API instead? Or is there a specific sequence of calls required to detach the interactions first? The UpdateUserAsync method doesn’t have an isActive flag that actually prevents deletion conflicts.