I have recently been offered a job with a government organisation in the UK. I was hired through a job agency, and one of the requirements is to be a UK national which I am. I got offered the job, and the past weeks have been a mess of getting security clearance. (I lived in multiple countries in the past making police checks for each of them very difficult). Now all of a sudden I received a phone call saying they've retracted the offer because I have also Italian citizenship. This is very shocking as I filled a form stating clearly i was a dual citizen before even attending the interview for the job itself. Can they do this?
In general your citizenship should not be a factor in job recruitment. But in a government job requiring security clearance your citizenship is absolutely a factor they can take into consideration.
One of the things that a secure government job requires is that your primary allegiance be to the UK. Let's say in the course of your job you find something that the UK government does not want the Italian government to know. The need to know that you will absolutely consider it your duty NOT to tell the Italian government about it - and also that the Italian government cannot put pressure on you to tell them.
So the second part is why they didn't tell you this when you applied. Being a dual citizen does not exclude you 100% - and it's also possible that the people interviewing you did not know whether being dual citizen would exclude you.
Usually these jobs have a clause in the contract that denial of the government security clearance can terminate the contract.
Most of the time companies are aware of the common requirements of a security clearance, e.g. only nationals of countries x, y, z, so they hire accordingly.
Nonetheless there can be issues, which the company doesn't know, but causes the government agency to deny the clearance. Therefore they have this clause in their contracts.
So unfortunately this is bad luck, but there isn't really anything you can do about it.