When a police officer is knocking at your door, do they have to tell you or introduce themselves as police officers??
That depends on what the officer wants to do. If the officer is under cover, s/he may choose not to identify as a police officer. If the desire is to search the house, or to arrest someone, the officer(s) do need to identify themselves. If the desire is just to talk to/question a possible witness, officers normally do identify themselves, but I am not sure that this is legally required.