The complaint from the young woman was initially brought to Jess O’Connell, who was the national director of operations for the Clinton campaign.
Ms. O’Connell, who is currently the chief executive officer of the Democratic National Committee, handled the investigation and advised the Clinton campaign manager, Patti Solis Doyle, that Mr. Strider should be fired, according to three people familiar with the events.
Ms. O’Connell told colleagues that she was concerned that the young woman making the allegations should not be demoted when she was moved from Mr. Strider’s supervision. The woman requested to have no more interactions with Mr. Strider, and she was moved to a different job within the campaign, reporting directly to Mike Henry, the deputy campaign manager.
The investigation into Mr. Strider’s conduct was described as brief, but it included a review of a number of emails he sent the young woman, who had shared an office with him.
A spokesman for Mrs. Clinton provided a statement from Utrecht, Kleinfeld, Fiori, Partners, the law firm that had represented the campaign in 2008 and which her advisers said has been involved on sexual harassment issues.
“To ensure a safe working environment, the campaign had a process to address complaints of misconduct or harassment. When matters arose, they were reviewed in accordance with these policies, and appropriate action was taken,” the statement said. “This complaint was no exception.”
Late Friday night, more than a day after The New York Times reached out to her aides for comment, Mrs. Clinton posted on Twitter that she was “dismayed when it occurred.”
She added that she called the woman on Friday “to tell her how proud I am of her and to make sure she knows what all women should: we deserve to be heard.”
Mrs. Clinton did not address why she ignored advisers’ recommendations that she fire Mr. Strider.
The woman’s experience and the reaction to it have not been previously reported. Until now, former Clinton associates were unwilling to discuss the events for publication.
But that changed after the start of the #MeToo movement, in which dozens of men across the country and across different industries have been fired or suspended for sexual misconduct.
This account was based on interviews with eight former campaign officials and associates of Mrs. Clinton’s.
They said that Ms. Solis Doyle, the campaign manager, and other senior campaign officials discussed the situation involving Mr. Strider and Mrs. Clinton’s response at the time. Some of them were troubled that he was allowed to remain on the campaign.
The complaint against Mr. Strider was made by a 30-year-old woman who shared an office with him. She told a campaign official that Mr. Strider had rubbed her shoulders inappropriately, kissed her on the forehead and sent her a string of suggestive emails, including at least one during the night, according to three former campaign officials familiar with what took place.
The complaint was taken to Ms. Doyle, the campaign manager, who approached Mrs. Clinton and urged that Mr. Strider, who was married at the time, be fired, according to the officials familiar with what took place. Mrs. Clinton said she did not want to, and instead he remained on her staff.
Ms. Doyle was fired shortly after that in a staff shake-up in response to Mrs. Clinton’s third-place finish in the 2008 Iowa caucuses. And Mr. Strider never attended the mandated counseling, according to two people with direct knowledge of the situation.
The woman who made the accusation against Mr. Strider in 2008 has not spoken publicly about it. She, like most campaign staff members, signed a nondisclosure agreement that barred employees from publicly discussing internal dynamics on the campaign, according to two people with direct knowledge of the contract. Reached by a reporter, she declined to comment.
Ms. Solis Doyle also declined to comment.
Mrs. Clinton’s candidacy has been cited as an inspiration for the #MeToo movement, but she has not played a visible role in it. After several Hollywood actresses told The Times and The New Yorker that Harvey Weinstein, a longtime friend and donor to the Clintons, had harassed or assaulted them, Mrs. Clinton spoke out against his behavior, saying in a statement that she was “shocked and appalled by the revelations.”
Weeks later the actress Lena Dunham, one of Mrs. Clinton’s most visible celebrity supporters in her 2016 presidential bid, told The Times that she warned two Clinton campaign aides against associating with Mr. Weinstein. “I just want you to know that Harvey’s a rapist and this is going to come out at some point,” Ms. Dunham said she told the campaign.
Nick Merrill, the communications director for Mrs. Clinton, said at the time Ms. Dunham spoke publicly that she was mistaken. “As to claims about a warning, that’s something staff wouldn’t forget,” he said.
A version of this article appears in print on January 27, 2018, on Page A13 of the New York edition with the headline: Clinton Opted to Shield Adviser Accused as Harasser.Continue reading the main story