It depends on the Unifi model. If the model uses 24v PoE, then you need mode B. For other Unifi models, mode A or B will work.
Almost all of our injectors support mode B. The only exception is the Gigabit 4 port injector. It’s mode A only.