REDMOND, Washington—Microsoft is investing $1.5 billion in a technology firm based in the United Arab Emirates and overseen by the country’s powerful national security adviser. Microsoft and the technology holding company G42 announced the deal on Tuesday. As part of the agreement, Microsoft’s president, Brad Smith, will join G42’s board…