Discrimination, permission to work and the Resident Labour Market Test
Employers are prohibited from discriminating against students based on their nationality: although the law requires employers to only hire individuals with a right to work in the UK, it is unlawful for them to refuse applications or not hire someone because of their citizenship. Some exemptions do apply (for example, roles related to national security), but in general, employers that reject people just because they need a visa could face legal action.
Many employers recruit graduates far in advance to factor in the timescales for applying for a licence, which usually take about 8 weeks. It can take longer if UK Visa and Immigration's (UKVI) review of your HR practices and understanding of sponsor obligations determines that its checks should be conducted. It is important to take advice and ensure you are able to pass UKVI's checks prior to submitting your application.
The Resident Labour Market Test, which required employers to show that there was no suitable European Economic Area (EEA) candidate who can take the proposed role, has been abolished for all types of Skilled Worker application. This applies whether the graduate is applying from inside the UK or outside of it. In addition, however, the UKVI caseworker must have no reason to believe that the job does not exist, is a sham, has been created mainly for the immigration application, or amounts to work for a third party who is not the sponsor.