As you might have guessed, the military has no legal reason to request IDs and register citizens. This is text-book behaviour in a #coup. (in Portuguese)
Sem amparo legal, militares usam celulares pessoais para ‘fichar’ moradores de favelas
ONG Justiça Global comparou ação ao apartheid e diz que ‘nem ditadura’ adotou esse procedimento
https://brasil.elpais.com/brasil/2018/02/24/politica/1519433345_411126.html