In University of Pennsylvania psychiatrist Jody Foster's new book The Schmuck in My Office: How to Deal Effectively with Difficult People at Work, she shares sound advice on dealing with narcissistic co-workers. From an excerpt at Quartz:
On a day-to-day basis, appealing to this person's egocentricity can be very effective. The occasional recognition of the person's achievement, strengths, or values may go a long way in avoiding anger or demeaning comments; in some instances, you may simply want to remark upon a person's good efforts. Fanning the embers of narcissism is particularly effective in avoiding unwanted conflict. Particularly if the Narcissus is your boss, you have to let them think that you perceive them as important. No matter how difficult it may be to do this, the Narcissus boss can make the workplace a living hell for anyone who they think is not on board with their success. Give them compliments, and try to do so without mocking them.
Remember that the only commentary that the Narcissus will be able to actually hear will contain some degree of praise in it. So when asking for a favor or for some type of change that could be perceived as an insult, definitely attempt the route of first praising him in some way. Even a simple statement like a reminder about a deadline might need some positive reinforcement embedded in it: "I can't wait to see your draft of the proposal on Friday." Remember that the Narcissus has special techniques for avoiding hearing criticism and can interpret even a simple suggestion or reminder as an insult if it doesn't contain anything positive.
Another strategy is paying attention to the Narcissus. If enough attention is not paid, he will perceive criticism. Even simple moves, like stopping by to say, "Have a good weekend" on the way out the door, can have positive effects on your workplace relationship.