(CNN) Stephanie Grisham, communications director for first lady Melania Trump, was issued a warning letter from the Office of the Special Counsel for violating the Hatch Act in July when she tweeted in acknowledgment of her third-year anniversary working for Trump.

The Hatch Act prohibits White House officials from advocating for or against candidates.

Prior to the White House, Grisham worked on Trump's presidential campaign. She had tweeted: "Three years ago today I listened to my gut & joined the Trump team in #PHX...& life has never been the same. So proud to work for both @POTUS @realDonaldTrump & @FLOTUS. #MAGA," she tweeted.

It was flagged by a political watchdog group, Citizens for Responsibility and Ethics in Washington, which filed a complaint with the Office of the Special Counsel, an independent investigative agency. CREW complained that Grisham was engaging in prohibited political activity when she tweeted the Trump campaign slogan, "MAGA."

Reached for comment about the ruling, Grisham tells CNN she firmly stands by the sentiments in her tweet.

Read More