Ms. Siyonbola produced the key to her apartment and opened the door, and the officers told her they needed to see her ID.

After she asked why, one says, “I don’t know anybody from anybody, so I’m here just to make sure you’re supposed to be here, make sure she’s supposed to be here, and we’ll get out of your hair.”

Ms. Siyonbola relented and handed over her ID.

But the officers struggled to verify it, and Ms. Siyonbola appeared to grow more frustrated.

At one point, she says, “I am not going to justify my existence here.”

At another, an officer who identifies himself as a supervisor says, “We determine who is allowed to be here or who’s not allowed to be here, regardless of whether you feel you’re allowed to be here or not.”

“I hope that makes you feel powerful,” she responds.

The Yale Police Department referred inquiries to the university.

“We believe the Yale police who responded followed procedures,” Tom Conroy, a spokesman for the university, said on Wednesday. “As we do with every incident, we will be reviewing the call and the response of the police officers to ensure that the proper protocol was followed, and to determine if there was anything we could have done better.”