"I didn't know it was him for about half an hour talking to him," Robbie admitted.
The photo booth shot also included Cara Delevingne, Sienna Miller and Suki Waterhouse.
"Suki was having a housewarming party," Robbie explained. "I was like, 'I'll pop in for 10 minutes.' About six hours later the photo booth happened."
Best Prince Harry moments:
Funny Prince Harry moments caught on camera
Margot Robbie didn't realize she was partying with Prince Harry over the holidays
Britain's Prince Harry (C) hands out cupcakes during a visit to the University of Canterbury's Student Volunteer Army in Christchurch on May 12, 2015. Prince Harry arrived in New Zealand on May 9 for a week-long visit. (Photo by Martin Hunter, AFP/Getty Images)
Prince Harry sits with pupils at Halfmoon Bay School in Oban as he leaves on May 11, 2015 in Stewart Island, New Zealand. Prince Harry is in New Zealand from May 9 through to May 16 attending events in Wellington, Invercargill, Stewart Island, Christchurch, Linton, Whanganui and Auckland. (Photo by Chris Jackson/Getty Images)
Prince Harry gets kissed by Royal Fan Victoria McRae during a walkabout outside the Sydney Opera House on May 7, 2015 in Sydney, Australia. Prince Harry is visiting Sydney following a month-long deployment with the Australian Army. (Photo by Chris Jackson/Getty Images)
In this Undated handout grab from video issued by Boultbee Flight Academy on Sunday April 5, 2015, Prince Harry flys in the back of a Spitfire on a sortie from Goodwood, West Sussex, via the Isle of Wight. The flight was to promote his Spitfire scholarship which offers training for wounded servicemen and women, flight training for the scholarship is delivered by Boultbee Flight Academy and supported by The Royal Foundation's Endeavour Fund. Prince Harry launched the scholarship selection in February 2014, the scholarship draws inspiration from the pilot Douglas Bader who flew throughout the Second World War with 20 individual aerial victories despite losing both his legs in 1931. (Photo by Andy R Annable/Boultbee Flight Academy/Getty Images) (NOTE TO EDITORS: The photographs shall be strictly for editorial use only. No charge should be made for the supply, release or publication of the photographs. There shall be no commercial use whatsoever of the photographs (including any use in merchandising, advertising or any other non-editorial use).
Prince Harry greets members of the public outside the Australian War Memorial on April 6, 2015 in Canberra, Australia. Prince Harry, or Captain Wales as he is known in the British Army, will end his military career with a month long secondment to the Australian Defence Force in barracks in Sydney, Perth and Darwin. (Photo by Lukas Coch - Pool/Getty Images)
Prince Harry listens to wildlife photographer Will Nicholls (not pictured) who uses the medium of wildlife photography to promote the conservation of red squirrels at Northumberland Wildlife Trust's Red Squirrel Northern England (RSNE) Project, where staff are working with the local community to safeguard the red squirrel (Sciurus vulgaris) population, with the main focus on a grey squirrel (Sciurus carolinensis) control programme at Frankham Woods on February 25, 2015 near Fourstones, United Kingdom. (Photo by Jason Friend /WPA Pool / Getty Images)
Prince Harry attends The Annual ICAP Charity Day at ICAP on December 3, 2014 in London, England. (Photo by Heathcliff O'Malley - WPA Pool /Getty Images)
Prince Harry cycles between venues on his Brompton Bike at Queen Elizabeth park on September 13, 2014 in London, England. The International sports event for 'wounded warriors', presented by Jaguar Land Rover was an idea developed by Prince Harry after he visited the Warrior Games in Colorado USA. The four day event has brought together thirteen teams from around the world to compete in nine events such as wheelchair basketball and sitting volleyball. (Photo by Chris Jackson/Getty Images)
Prince Harry is given a blow-up kangaroo by the Australian swimming team at the Aquatics Centre during the Invictus Games at Queen Elizabeth park on September 14, 2014 in London, England. The International sports event for 'wounded warriors', presented by Jaguar Land Rover was an idea developed by Prince Harry after he visited the Warrior Games in Colorado USA. The four day event has brought together thirteen teams from around the world to compete in nine events such as wheelchair basketball and sitting volleyball. (Photo by Chris Jackson/Getty Images)
Britain's Prince Harry (L) celebrates with Great Britain's David Henson after the latter won the 200m men ambulant IT2 race during the athletics event of the Invictus Games at Queen Elizabeth II Park in London on September 11, 2014. More than 400 wounded troops from 13 countries -- both serving and veter -- will go for gold across nine sports at Prince Harry's Invictus Games in London Between 10-14 September. AFP PHOTO/ADRIAN DENNIS (Photo credit should read ADRIAN DENNIS/AFP/Getty Images)
GLASGOW, SCOTLAND - JULY 29: Prince Harry plays a game during a visit to the Commonwealth Games Village on July 29, 2014 in Glasgow, Scotland. (Photo by Danny Lawson - WPA Pool / Getty Images)
SANTIAGO, CHILE - JUNE 27: Prince Harry blows a raspberry at a child as he visits kindergarten of indigenous children a on June 27, 2014 in Santiago, Chile. Prince Harry is on a three day tour of Chile after visiting Brazil. (Photo by Dan Charity - Pool/Getty Images)
Britain's Prince Harry (C, back), poses for pictures with residents of 'Cracolandia', one of Sao Paulo's poorest neighbourhoods where crack is omnipresent, during his visit to Brazil, on June 26, 2014. After Brazil, the prince will move on to the Chilean capital Santiago and the city of Valparaiso. AFP PHOTO / Miguel SCHINCARIOL (Photo credit should read Miguel Schincariol/AFP/Getty Images)
LONDON, ENGLAND - JUNE 14: Prince Harry, Catherine, Duchess of Cambridge and Prince William, Duke of Cambridge stand on the balcony during during Trooping the Colour - Queen Elizabeth II's Birthday Parade, at The Royal Horseguards on June 14, 2014 in London, England. (Photo by Chris Jackson/Getty Images)
ANTAEAYA, CHILE - JUNE 29: Prince Harry holds an albino African pygmy hedgehog during a visit to an outdoor centre on June 29, 2014 in Antaeaya, Chile. Prince Harry is on the final day of a three day tour of Chile after visiting Brazil. (Photo by Chris Jackson/Getty Images)
LONDON, ENGLAND - APRIL 04: HRH Prince Harry explores a new playground with a group of children from Gainsborough Primary school in Newham during an official visit to Queen Elizabeth Olympic Park with the Mayor of London, Boris Johnson on April 4, 2014 in London, England The park will open to the public on Saturday 5th April. (Photo by Chris Harris - WPA Pool /Getty Images)
KINGSTON, JAMAICA - MARCH 06: Prince Harry poses at the Usain Bolt Track at the University of the West Indies on March 6, 2012 in Kingston, Jamaica. Prince Harry is in Jamaica as part of a Diamond Jubilee Tour, representing Queen Elizabeth II, taking in Belize, the Bahamas, Jamaica and Brazil. (Photo by Chris Jackson/Getty Images)
Sandhurst, UNITED KINGDOM: Britain's Queen Elizabeth II (L) smiles with her grandson Prince Harry (4th R) during the Sovereign's Parade at the Royal Military Academy in Sandhurst, southern England, April 12, 2006. Officer Cadet H Wales as Prince Harry is known, will train to become a troop commander, in charge of 11 enlisted men and four light tanks -- a job that could soon see him on front-line duty in Iraq or Afghanistan. His grandmother Queen Elizabeth II, who turns 80 on April 21, and father Prince Charles both turned out for the passing-out ceremony where Harry and 218 other officer cadets in crisp blue uniforms, each carrying thin silver swords, received their commissions after 44 weeks of gruelling training.AFP PHOTO/Dylan Martinez/ Pool/REUTERS (Photo credit should read DYLAN MARTINEZ/AFP/Getty Images)
Britain's Prince Harry sits in the drivers seat of a Jaguar F-Type at the Goodwood Motor Circuit in Chichester, West Sussex, where he was attending a track day for the Royal Foundation Endeavour Fund. Harry met injured services personnel and joined them in driving classic cars before visiting the Boultbee Flight Academy. AFP PHOTO / POOL / STEFAN ROUSSEAU (Photo credit should read STEFAN ROUSSEAU/AFP/Getty Images)
LONDON, ENGLAND - JUNE 15: Prince Harry, Catherine, Duchess of Cambridge and Prince William, Duke of Cambridge stand on the balcony at Buckingham Palace during the annual Trooping the Colour Ceremony on June 15, 2013 in London, England. Today's ceremony which marks the Queens official birthday will not be attended by Prince Philip the Duke of Edinburgh as he recuperates from abdominal surgery and will also be The Duchess of Cambridge's last public engagement before her baby is due to be born next month. (Photo by Chris Jackson/Getty Images)
Britain's Prince Harry, patron of the Invictus Games Foundation, shares popcorn with a child while attending the Sitting Volleyball competition at the games in Toronto, Ontario, Canada, September 27, 2017. REUTERS/Fred Thornhill TPX IMAGES OF THE DAY
Britain's Prince Harry and and his wife Meghan, Duchess of Sussex experience native food at the Charcoal Lane Mission Australia social enterprise restaurant in Melbourne on October 18, 2018. - Chargrilled kangaroo was on the royal menu on October 18 as Prince Harry and his pregnant wife Meghan arrived in Australia's second-largest city Melbourne, where they were greeted by thousands of screaming fans. (Photo by ANDY BROWNBILL / POOL / AFP) (Photo credit should read ANDY BROWNBILL/AFP/Getty Images)
Britain's Prince Harry jokes with the crowd as he meets members of the public during a walkabout on the Esplanade at Edinburgh Castle, during a visit to Scotland on February 13, 2018. / AFP PHOTO / POOL / ANDREW MILLIGAN (Photo credit should read ANDREW MILLIGAN/AFP/Getty Images)
Prince Harry jokes with another spectator at the wheelchair rugby match between the United States and Denmark at the Invictus Games in Toronto, Ontario, September 28, 2017. The first Invictus Games, based on the Paralympic Games, were held in September 2014 in London. They were launched by Prince Harry, who served with the British Army in Afghanistan. This year's Games are taking place in Canada, which is marking the 150th anniversary of the founding of its confederation and the centenary of the Battle of Vimy during World War I. / AFP PHOTO / Geoff Robins (Photo credit should read GEOFF ROBINS/AFP/Getty Images)
Carina Clarkin (L) and Britain's Prince Harry (R) share a joke on the podium after playing for Foxcote, in the Jerudong Park Trophy Final against CPPC at Cirencester Park Polo Club, central England on July 15, 2017. / AFP PHOTO / CHRIS J RATCLIFFE (Photo credit should read CHRIS J RATCLIFFE/AFP/Getty Images)
Prince Harry shares a joke with Brendan Foster during the Virgin Money London Marathon, London. PRESS ASSOCIATION. Picture date: Sunday April 23, 2017. See PA story ATHLETICS Marathon. Photo credit should read: Yui Mok/PA Wire (Photo by Yui Mok/PA Images via Getty Images)
ST JOHNS, ANTIGUA - NOVEMBER 22: Prince Harry plants a tree during the unveiling of the dedication to The Queen's Commonwealth Canopy and Arbour Day Fair at Queen Victoria Park Botanical Gardens on the third day of an official visit on November 22, 2016 in St John's, Antigua and Barbuda. Prince Harry's visit to The Caribbean marks the 35th Anniversary of Independence in Antigua and Barbuda and the 50th Anniversary of Independence in Barbados and Guyana. (Photo by Chris Jackson/Getty Images)
NOTTINGHAM, ENGLAND - OCTOBER 26: Prince Harry jokes with Trevor Rose as he visits Russell Youth Centre on October 26, 2016 in Nottingham, England. (Photo by Samir Hussein/WireImage)
STOCKPORT, UNITED KINGDOM - JUNE 21: (EMBARGOED FOR PUBLICATION IN UK NEWSPAPERS UNTIL 48 HOURS AFTER CREATE DATE AND TIME) Prince Harry plays rugby as he attends an RFU-backed community rugby programme in Alexandra Park on June 21, 2016 in Stockport, England. (Photo by Max Mumby/Indigo/Getty Images)
DURBAN, SOUTH AFRICA - DECEMBER 01: (HELLO! MAGAZINE OUT) Prince Harry jokes around the mascot of The Sharks rugby club at Kings Park Stadium during an official visit to Africa on December 1, 2015 in Durban, South Africa. (Photo by Samir Hussein/Pool/WireImage)
US First Lady Michelle Obama makes a joke about the looks of Britain's Prince Harry (R) as they attend a Wounded Warriors wheelchair basketball game at Fort Belvoir, Virginia, October 28, 2015. The Prince, who is the Patron of the Invictus Games, an international sports competition for wounded armed service members, visits to highlight the upcoming Invictus Games to be held in Orlando in May 2016. AFP PHOTO / SAUL LOEB / AFP / SAUL LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)
MANCHESTER, ENGLAND - OCTOBER 20: Prince Harry jokes with Sarah Hunter of the women's England rugby team at a teacher training session and rugby festival at Eccles RFC on October 20, 2014 in Manchester, England. (Photo by Danny Martindale/WireImage)
Robbie's co-star Tina Fey joked that the drinks seemed to be flowing plentifully at the event.
"Looking at this picture, I can't imagine why you weren't aware of who was with you or your surroundings," Fey teased.
In the movie, two-time Golden Globe winner plays a journalist sent to Kabul, Afghanistan on assignment. The war comedy is based on reporter Kim Barker's memoir, The Taliban Shuffle: Strange Days in Afghanistan and Pakistan.