Search at work is a complicated topic, and a lot hinges on reasonable expectations of privacy. Generally speaking, we can expect privacy at work with respect to our personal items -- bags, briefcases, and purses -- but there are certainly exceptions.
Employers can, under certain circumstances, search an employee's effects, like a locker or desk, and even a bag depending on company policy. The determination of legality or illegality is made on a case-by-case basis. Let's look at what a court considers when contemplating a search at work and whether it was an invasion of privacy.
Two major considerations when discussing any search are whether there is a reasonable suspicion for a search and whether there can be a reasonable expectation of privacy in the thing searched. When it comes to bags and briefcases, we do have a reasonable expectation of privacy ... mostly, except when we do not.
Generally speaking, in most situations, an employer who wants to search a personal and private item will have to do so with a court order. Your boss can't just start rifling through your stuff ... unless that is what the company wants done on a regular basis and you are aware of it.
In reality, many retail workers submit to bag searches when they leave work. If that is a stated company policy then you don't really have a reasonable expectation of privacy in the thing searched -- you're on notice that this search is a condition of work.
Other factors to consider in work searches generally are whether it's a private or public employer (as government workers tend to have stronger workplace privacy rights), where the search took place, whether other employees were also searched, and the physical setup of the workspace.
Although you won't know without challenging a search in court that your assessment is correct, you can get a sense for whether your privacy rights were violated with an employer bag search by considering the nature of the search. Even an otherwise legal search might be deemed an invasion of privacy if, for example, you were physically or verbally threatened.
Similarly, if the company reserves the right to search but specifies a particular authority for this and someone unauthorized instead rummages through your stuff, this too could indicate an illegal search. Companies can reserve the right to search workers but then they must follow all aspects of the policy, including correct search process, or risk being sued for invasion of privacy.
If your bags or other items were searched at work and you suspect an invasion of privacy, speak to a lawyer. Many attorneys consult for free or a minimal fee and will be happy to hear your story and assess your case.