The Magic Mirror, formerly known as Genie of Agrabah, also known as Sidney Glass following the Dark Curse, is a character in ABC's fantasy-drama series Once Upon a Time.
History[]
Before he became the Magic Mirror, he was a Genie, a powerful magical being who was imprisoned within the confines of a magic lamp and freed by King Leopold.
During a birthday party for the king, the Genie sees Regina alone and unhappy, while the king, his daughter, and their subjects are all enjoying the king's speech about his daughter and how she looks like his first wife, her mother, who was the "fairest of them all". When Regina is alone outside, the Genie follows, giving her a mirror to show her how beautiful she is, as he sees her as the fairest in the land. Some time later, the king finds the mirror and discovers written in her diary that she has found another love and asks the Genie to find the person who gave her the mirror. As the Genie stood under Regina's apple tree, the queen's father, Henry, delivers a box asking him to take it to his daughter as he isn't allowed inside the castle. After telling Regina that he has successfully killed the king and that they can now be together, Regina tells him that she never loved him and only used him to kill King Leopold for her. His heart broken, the genie wishes to be with her forever and to look upon her face always. With this wish and much to his dismay, he becomes trapped as the Magic Mirror, now, ironically, able to look upon Regina forever. After his imprisonment in mirrors, Regina uses him for spying on her enemies.

The Magic Mirror's Storybrooke counterpart, Sidney Glass.
In Storybrooke, he is Sidney Glass. He is first seen gathering information on the newcomer Emma Swan under the mayor Regina Mills' orders. However, he is unable to get anything from her. Regina threatens him, and he leaves. Sidney then publishes many articles about Emma's messy past, trying to make the townspeople begin to hate her. However, this tactic is unsuccessful. Some articles on Emma's past include how Henry Mills was born, and that she was drunk when she hit the Storybrooke landmark by the side of the road.
After Sheriff Graham's death, Regina appoints Sidney as the new sheriff. However, Emma challenges this. He makes a speech at the debate that occurs prior to the election, something that was clearly created by Regina. However, due to Emma revealing that the fire at the mayor's office was Mr. Gold's doing, he lost. This caused Regina to fire him from The Daily Mirror.
After the election, Regina has an argument with Emma. After the mayor leaves, Sidney slides into the opposite end of the booth Emma was at and tells her that he can help her expose Regina for who she really is. However, when they try to expose her at the town meeting, the "house" that Regina was building was actually a modern playground for the children of Storybrooke. Ashamed and embarrassed, Sidney retreats to Granny's Diner in order to have a drink. Emma joins him there, and the two pledge to become allies. When he was no longer of value to Regina, he is revealed to be a prisoner in the catacombs of the hospital when Jefferson goes to let Belle out of her cell when Regina had to refuse to hold her end of the bargain in episode, "A Land Without Magic".
A few years later, Regina makes Sidney the Magic Mirror again to make him look for a person known as the Author in hopes of finding a happy ending for herself. This entrapment prompts Sidney to conspire with the Snow Queen and lure Regina and Emma into a trap in exchange for his freedom. Once done, the Snow Queen holds her end of the bargain. While Sidney is willing to serve her, she is only interested in collecting a piece of the mirror he was trapped in. He was then released into the magic-free world.