The Osaka Regional Immigration Bureau locked 17 foreign detainees in a room for six people for about 24 hours after they acted aggressively, officials said Monday.