Borderlands are spaces of uncertainty and constant change, where decisions on the welcoming or refusal of migrants are taken. Today those spaces are far less defined by geographical borders, and thus allow for forms of exclusion to emerge in various moments and places. Often it is street-level bureaucrats who encounter migrant individuals and who base their decisions on their experiences, training and personal values in the context of restrictive policies and laws. This contribution argues that studying the training of migration agents facilitates an understanding of how a professional habitus is shaped, and of how othering comes into being. Organizational socialization reproduces and sustains institutionalized social interactions between the bureaucrat and their clients. The ethnographic data, collected through participant observation and semi-structured interviews with Swiss and Swedish migration authorities, will critically discuss learning processes in government agencies dealing with the detection, detention and deportation of migrants with precarious legal status.