Samuel Richard "Sandy" Berger (October 28, 1945 – December 2, 2015) was an American political consultant who served as the United States National Security Advisor for President Bill Clinton from March 14, 1997, until January 20, 2001.
 Before that he served as the Deputy National Security Advisor for the Clinton Administration from January 20, 1993, until March 14, 1997.
John Owen Brennan (born September 22, 1955) was the Director of the Central Intelligence Agency from March 2013 to January 2017.
 He has served as chief counterterrorism advisor to U.S. President Barack Obama; his title was Deputy National Security Advisor for Homeland Security and Counterterrorism, and Assistant to the President.
 His responsibilities included overseeing plans to protect the country from terrorism and respond to natural disasters, and he met with the President daily.
 Previously, he advised President Obama on foreign policy and intelligence issues during the 2008 presidential campaign and transition.
 Brennan withdrew his name from consideration for Director of the Central Intelligence Agency (CIA) in the first Obama administration over concerns about his support for transferring terror suspects to countries where they may be tortured while serving under President George W. Bush.
 Instead, Brennan was appointed Deputy National Security Advisor, a position which did not require Senate confirmation.
John Marlan Poindexter (born August 12, 1936) is a retired United States naval officer and Department of Defense official.
 He was Deputy National Security Advisor and National Security Advisor for the Reagan administration.
 He was convicted in April 1990 of multiple felonies as a result of his actions in the Iran–Contra affair, but his convictions were reversed on appeal in 1991.
 More recently, he served a brief stint as the director of the DARPA Information Awareness Office for the George W. Bush administration.
 He is the father of NASA astronaut and U.S. Navy Captain Alan G. Poindexter.
Faryar Shirzad (in Persian: فریار شیرزاد‎ ‎ ); born 1965 in London formerly served on the staff of the National Security Council at the White House from March 2003 through August 2006, first as a special assistant to the President for International Economic Affairs, and then as deputy assistant to the President and deputy national security advisor for International Economic Affairs.
 In those roles, Shirzad was responsible for advising the President, the National Security Advisor and the Director of the National Economic Council on all international economic policy matters, including trade, investment, finance, development, energy and environment.
 He also served as the President’s personal representative to the G-8 (the “G8 Sherpa”), and led the preparations for the President’s participation in other international economic summits, such as the U.S.-E.U. Summit, the Asia Pacific Economic Cooperation Forum and the Summit of the Americas.
Stephen John Hadley (born February 13, 1947) was the 21st U.S. Assistant to the President for National Security Affairs (commonly referred as National Security Advisor), serving under President George W. Bush during the second term of his administration.
 Hadley was Deputy National Security Advisor during the Bush's first term.
 Before that Hadley served in a variety of capacities in the defense and national security fields.
 He has also worked as a lawyer and consultant in private practice.
Frances M. "Fran" Fragos Townsend (born December 28, 1961) is the former Homeland Security Advisor to United States President George W. Bush and a TV personality.
 Townsend was appointed to this position by President Bush on May 28, 2004.
 Her resignation was announced November 19, 2007.
 She chaired the Homeland Security Council and reported to the President on homeland security policy and counterterrorism policy.
 She previously served as Deputy Assistant to the President and Deputy National Security Advisor for Combating Terrorism.
 In 2008, Townsend joined CNN as a contributor.
 Townsend is president of the Counter Extremism Project.
Mark Pfeifle (born March 30, 1972) was a top national security advisor and communicator for President George W. Bush.
 Pfeifle served as deputy assistant to the president and deputy national security advisor for strategic communications and global outreach at the White House from 2007 to 2009.
 Pfeifle is the founder and president of Off the Record Strategies, a public relations and strategy company, and he is a blogger for the Huffington Post.
The Assistant to the President for Homeland Security and Counterterrorism, commonly referred to as the Homeland Security Advisor and occasionally holding the title of Deputy National Security Advisor for Homeland Security and Counterterrorism, is a senior aide in the Executive Office of the President, based in the West Wing of the White House, who serves as the chief in-house advisor to the President of the United States on homeland security and counterterrorism issues.
 The Homeland Security Advisor is a statutory member of the Homeland Security Council.
 Serving at the pleasure of the President, the Homeland Security Advisor does not require Senate confirmation for appointment to the office.
The Iran–Contra affair (Persian: ماجراي ایران-کنترا‎ ‎ , Spanish: "caso Irán-Contra" ), also referred to as Irangate, Contragate or the Iran–Contra scandal, was a political scandal in the United States that occurred during the second term of the Reagan Administration.
 Senior administration officials secretly facilitated the sale of arms to Iran, which was the subject of an arms embargo.
 They hoped, thereby, to fund the Contras in Nicaragua while at the same time negotiating the release of several U.S. hostages. Under the Boland Amendment, further funding of the Contras by the government had been prohibited by Congress.
The Deputy Assistant to the President for National Security Affairs, also known as the Deputy National Security Advisor, is a member of the Executive Office of the President of the United States and the United States National Security Council, serving as deputy to the President's National Security Advisor.

Question: What scandal facilited the sale of arms to Iran and occurred while John Poindexter was Deputy national Security Advisor?
Answer: Iran–Contra affair