I had this happen before as well with my '02 325i. Evidently, I am not sure with other makes or models, but with ours there are two brands of alternators. A French one (can not remember the name) and Bosch. The French ones fail all the time. That is what I had, I had the dealership (under warranty) replace it with Bosch. Also few month later my battery went dead. Under warranty I had it replaced too and no issues since. I think I had about 40k miles on it... Hope this helps.