Jennifer Lopez is returning to 'Will & Grace'.

Jennifer Lopez

Jennifer Lopez

The 48-year-old singer-and-actress is heading back to the NBC comedy following its recent revival after previously appearing in series six and seven, and this time she will take on two different roles.

Vanity Fair magazine has confirmed Jennifer will portray herself and she will also star as her 'Shades of Blue' alter-ego, detective Harlee Santos, in the sitcom.

Jennifer previously appeared in the season six finale when she sang 'Waiting for Tonight' at Karen Walker (Megan Mullally) and Lyle Finster's (John Cleese) wedding, with Jack McFarland (Sean Hayes) acting as one of her backing dancers.

She was also in the series seven premiere where it was revealed she grew up with Karen's maid, Rosario Salazar (Shelley Morrison), a character who has since passed away.

NBC are yet to have revealed further details about what Jennifer will get up to in her forthcoming 'Will & Grace' cameo.

Jennifer is among a number of huge stars who have featured in the show, including Harry Connick Jr, who has played Grace's husband Leo Markus from the fifth series, and Minnie Driver starred as Lorraine Finster.

The show - which stars Debra Messing and Eric McCormack as best friends Grace Adler and Will Truman - was recently revived after NBC confirmed last August it had been recommissioned for a "minimum of two seasons".

The original 'Will & Grace' series began in 1998 and aired for nearly 200 episodes over eight seasons before ending in May 2006.