The Mandalorian needs an Imperial-soldier-turned-prisoner, Migs Mayfeld, to acquire coordinates to villain Moff Gideon's ship. Mayfeld takes them to a hidden Imperial base and has the Mandalorian join because Mayfeld is easily recognized by Imperial security. The terminal where they will steal the coordinates is in the officer's mess hall. Mayfeld sees his former commanding officer, Valin Hess, so the Mandalorian goes in alone to make sure Mayfeld isn't recognized. The terminal requires a facial recognition scan, which forces the Mandalorian to remove his helmet (something he can't do in front of others according to the Creed). The Mandalorian is confronted by Hess, but Mayfeld intervenes and after an angry chat, Mayfeld kills Hess and forces them both to run.
Note: It's strange that the facial recognition system gives access to the Mandalorian since he's never served in the Imperial army, but the main point for the show is that he's not flagged as not having access.