From the BBC news story:

"Scotland Yard refused to comment on reports the man had passed through a security check at the castle by using the name of a senior detective currently heading a high profile investigation."

So he didn't need to be wearing a uniform.
_________________________
Remind me to change my signature to something more interesting someday