Sidd Bikkannavar, a scientist at NASA's Jet Propulsion Laboratory (JPL), still doesn't know why he was detained by US Customs and Border Patrol and compelled under duress to give agent's the access PIN to his NASA-owned mobile phone.
From The Verge:
Seemingly, Bikkannavar's reentry into the country should not have raised any flags. Not only is he a natural-born US citizen, but he's also enrolled in Global Entry — a program through CBP that allows individuals who have undergone background checks to have expedited entry into the country. He hasn't visited the countries listed in the immigration ban and he has worked at JPL — a major center at a US federal agency — for 10 years. There, he works on "wavefront sensing and control," a type of optics technology that will be used on the upcoming James Webb Space Telescope.
The officer also presented Bikkannavar with a document titled "Inspection of Electronic Devices" and explained that CBP had authority to search his phone. Bikkannavar did not want to hand over the device, because it was given to him by JPL and is technically NASA property. He even showed the officer the JPL barcode on the back of phone. Nonetheless, CBP asked for the phone and the access PIN. "I was cautiously telling him I wasn't allowed to give it out, because I didn't want to seem like I was not cooperating," says Bikkannavar. "I told him I'm not really allowed to give the passcode; I have to protect access. But he insisted they had the authority to search it."
See also: How to legally cross a US (or other) border without surrendering your data and passwords