Edinburgh University has blamed a "system error" after final year students were sent an email which said they would not graduate this summer.
The email claimed each candidate had not achieved sufficient credits to receive their degree.
Students have now been told to ignore the message, which was sent out in the early hours of Thursday.
The university has insisted there was no breach of their systems and no student data has been compromised.
A university spokesperson said: "Our preliminary investigation suggests that these emails were regrettably issued as a result of a system error.
"There was no breach of our systems and no student data was compromised. The university has written to all students affected to reassure them that their graduations have not been cancelled and asking them to ignore the emails.
"All students who might have received the inaccurate information were contacted first thing this morning and told that this was an error. We are currently investigating exactly which students were affected."
A statement from the university's Student Systems and Administration department added: "We are aware that a number of final year students have received an email, apparently from the university, informing them that their graduation has been cancelled.
"Please ignore this message. No graduations have been cancelled. Your final degree results will be released in line with the published schedule - no later than 16th June for the great majority of students and no later than the 23rd of June for Medics and Vets.
"We are looking urgently into this situation. We will be back in contact with you as soon as we can and will also ensure your MyEd/EUCLID screens are refreshed with accurate information."
The email sent out in error read: "You recently registered to attend a graduation ceremony this summer.
"However, we are now advised that you are not expected to complete your studies until later in the year, and therefore we presume that you may be eligible to attend the next available graduation ceremony.
"If this is not also your understanding please could you contact us immediately."
Calum Mackie, who has been studying English Literature and History, said he received the email just after midnight.
'Frustrated and annoyed'
He logged on to a special portal for students on the university website which also said he did not have enough credits to graduate this summer.
He then spent the night worrying as he was not able to speak to anyone at the university to find out what had actually happened until later in the morning.
Mr Mackie said he thought it was possible an automated email had been sent in error as students planning to graduate would not have enough credits until their recent exams were actually marked.
Mr Mackie, who plans to start teacher-training in the autumn, said: "Once we realised this was a mistake, people were just frustrated and annoyed. Errors happen but this seems to have been a very big error."
Many students may have job offers or provisional places on postgraduate courses which rely on them gaining their degree or a particular class of degree first.
Several of them took to social media to criticise the university.
One, named Ruth, tweeted: "Massive anxiety and distress caused by Edinburgh University emailing all final years saying they failed. #StudentWelfare #WhatStudentWelfare"