While we all can't be perpetual idea machines, most of us have moments of occasional brilliance at the office. But what happens when you share your great idea with your colleagues, only to have one of them run with it and take credit along the way?

It happens more often than you'd think, but having a coworker get credit for something your brain concocted can be frustrating beyond belief. Worse yet, it's the sort of thing that could spell the difference between that colleague getting promoted instead of you, so knowing how to handle the situation is crucial. Here are a few steps to take if you land in this aggravating, yet all-too-common, scenario.

Man in suit at a computer, holding his head

IMAGE SOURCE: GETTY IMAGES.

1. Figure out whether your colleague acted intentionally

Years ago, former Beatle George Harrison was found guilty of songwriting plagiarism when he inadvertently produced a hit whose melody was featured in an older tune. His defense? He didn't realize the music didn't come from him. Since Mr. Harrison was clearly a capable, talented musician, it's easy to see where he simply made a mistake. Similarly, there's a good chance your colleague's idea-snatching antics may have been unintentional.

Before you jump to conclusions about your colleague, think about how unique your idea really was. Is there a chance your colleague could've thought of it, as well? Could it be that they forgot you once mentioned it in passing? Give your coworker the benefit of the doubt before hurling accusations their way.

2. Determine whether it's worth speaking up

Unearthing a major solution to a prevalent software bug is the sort of thing that could propel your career to the next level, so if your colleague is hogging the credit for something as high-profile as that, it's worth your while to speak up. That said, if the credit that was stolen out from under you relates to something minor in nature, you may be better off letting it go. The last thing you want to do is go to war with a coworker over something insignificant or come off as petty to your boss. If, for example, you tweak a line of copy on a marketing brochure and your colleague forgets to acknowledge your contribution, you probably can just move on.

3. Confront your offending colleague

If you come to the conclusion that your coworker intentionally stole your big idea, your next move is to confront them -- professionally, of course. Ask to speak to them privately, lay out the facts, and demand an explanation.

If your colleague owns up to their actions and apologizes, ask that they make it clear that the idea came from you, and then close out the matter. There's no need to have that coworker shed blood if they're willing to make things right. But if they refuse to do that, you'll have no choice but to get your boss involved.

4. Set your boss straight

Clamoring for credit in front of your boss is an uncomfortable position to be in, but if your colleague steals your idea and refuses to give you credit, you'll have no choice but to go that route if you want your boss looped in. Before you do, however, compile as much evidence as possible to support your claim. In the above example, you might gather previous iterations of code that led to that software fix so that your boss sees how you came up with that solution and is more inclined to believe your story.

If you don't have anything to help back up your claim, it's going to be a harder conversation to have. But if you keep your tone and wording professional, you'll come out OK. Sit your boss down and explain that while you hate to be in the position you're in, you're disturbed by your coworker's actions. Furthermore, make it clear that your goal in having the conversation is not to be a tattletale, but to get some acknowledgement for an idea into which you put a lot of effort. With any luck, your boss will be receptive and take action appropriately.

Dealing with a toxic, idea-snatching coworker never is fun, but if someone nabs the credit for your idea, you can take steps to ensure that they don't get away with it. And that's something the rest of your colleagues might come to appreciate, too.