check to see if your courtesy lights work with the drivers door, some cars have micro switches in the lock mechanism that fail & need replacing (mostly V.A.G models) others have pin switches that return to earth, they need removed, cleaned on the contactor inside & refitted to remake the connection.
It could also be a relay in a module, really depends on the make model & year!
Andy Spanner, January 2017