A former federal agent in North Texas now regrets taking CBD oil, just a dropper full, because he said it wrecked his career in law enforcement. And he's not the only federal worker who has gotten into trouble after taking CBD, even though it's now legal.

A union that represents thousands of federal law enforcement agents says others among their ranks are now facing discipline on the job. And drug-testing experts say non-government employees can also get into a jam at work, even if the CBD oil they take is legal.

"You know, I served the public. I served my country. And it's a sick feeling," the now-out-of-work federal agent said about the end of his 28-year service, much of it working undercover for the Department of Homeland Security.

Because of what he did previously, protecting the public, he did not want his name revealed, or his face shown on camera.

The end came, the former agent said, after he tried a small amount of CBD in March in hopes of easing a job-related back pain.

Days later, he failed a random drug test that came back positive for marijuana.

The former agent said he is certain the test results were skewed by his deciding, for the first time, to try to rid the pain in his back by taking CBD.

Texas recently legalized the product, as long as it contains very little THC, the ingredient that, in greater quantities, produces a high in marijuana.

Don Mihalek, legislative director for the Federal Law Enforcement Officers Association, talks about CBD use by federal employees and how federal employees must still uphold federal laws and policies.

But while the law changed, conventional drug testing did not, with those tests being able to detect the presence of THC in a person, but not the amount.

Another problem for the former agent was that, while the federal government and a string of states have legalized CBD, federal employment rules still prohibit any use of THC, no matter how diluted in a bottle of CBD.

"I explained to the medical director that I've never used drugs in my life … never tried marijuana. And he said, 'Well, I can't use that as an excuse,'" the former agent said.

That no-tolerance warning also came in a recent federal government notice to managers saying that unless employees have a doctor's prescription for two particular prescription drugs, "there is no legitimate medical explanation for a marijuana positive test result …"

After he was put on administrative leave, and his security clearance revoked, the agent moved quick to retire, because he feared he was about to get fired.

"It's a horrible feeling. You feel like you're a nobody. You feel like nobody will listen to you," he said.

He's not alone, said Don Mihalek, legislative director for the Federal Law Enforcement Officers Association.

Mihalek said there is "more than a couple of dozen" federal law enforcement employees who are in trouble at work because they used CBD.

While CBD may be legal in a court of law, its use can still be a problem for people in the work place, because conventional testing can't differentiate between it and marijuana, which is still illegal in Texas.

That void in proving what's legal and what's not should have been given more consideration as lawmakers moved toward legalizing CBD, said Nina French, a drug testing consultant.

"I can honestly not think of anything in our history that we have managed to botch to this degree," French said.

Doctors warn that regulation of the industry has also not kept up with the CBD craze.

One study found that more than 60 percent of CBD products were mislabeled, with some containing higher amounts of THC than advertised.

"And so unless a person really knows and has confidence in the purity of a particular brand that they have, they could have an unfortunate surprise on a urine drug test," said Dr. Michael Kosnett, a drug testing expert at the University of Colorado.

The former agent said the CBD he took was labeled THC-free. But a more detailed lab report, found by scanning the bar code on the bottle, showed it, instead, contained a trace amount of THC – below the legal limit, but still enough to show up in a urine test, according to experts.

And enough to end a career.

"If I had known I was going to test positive for this stuff, I would have never taken it," the former agent said, adding: "I mean, look what I've had to go through."