Forced migration has become a global megatrend, and many refugees are school aged. As social integration is key to their wellbeing and success, it is pivotal to determine factors that promote the social integration of refugee youth within schools. Here, using a large, nationally representative social network dataset from Germany, we examine the relationships of refugee adolescents with their peers (304 classrooms, 6,390 adolescents and 487 refugees). We find that refugee adolescents have fewer friends and are more often rejected as desk mates than their classmates. Crucially, however, they are less rejected in more diverse classrooms. This results from two basic processes: (1) more opportunities to meet other ethnic minority peers, who are more accepting of refugees in general and (2) higher acceptance of refugee adolescents by ethnic majority peers in more diverse settings. Our results can help promote the social adjustment of young refugees in school and mitigate the negative consequences of prejudice.