Political acrobatics abound for the Homeland Security Secretary.

Kirstjen Nielsen has walked a “tightrope” in carrying out President Trump’s immigration agenda while maintaining working relationships with Democrat border-state leaders, according to a new Politico report. “It’s a balancing act,” said a person who has worked with Nielsen, who replaced former DHS chief John Kelly in December after his appointment to chief of staff.

You, too, can walk this fine line at work. But first, it’s important to differentiate between being a people-pleaser and treading delicately between competing interests pulling you in different directions. “A people-pleaser is someone who is so conflict-averse or who is so desperate to curry favor with other people that they are incapable of saying no, even to things that one really ought to say no to,” marketing strategy consultant Dorie Clark told Moneyish. “That inability to say no can lead to damaging situations.”

Also read: How to survive a toxic work environment — and escape intact

On the flip side, she said, it’s “a rather noble goal to be someone who is a thoughtful conciliator — who is able to say ‘no’ when it needs to be said, but wherever possible, is trying to proactively seek a solution that will be beneficial to as many people as possible.”

Here’s how to do just that, according to Clark and other experts:

Be clear on your own ethical boundaries. “The first question to ask yourself is, what are your own core beliefs? What is the internal compass that you need to follow?” Clark said. “The most important thing is making sure that the professional decisions you make are compatible with your personal values — because you never want to compromise your ethics or your core beliefs to suit a position. It’s just not worth it.”

In general, defer to your boss’s wishes. Provided you feel OK with the ask, Clark said, “it is politically most important” for you to follow your boss’s instructions — after all, this is the person with the authority to hire or fire you. “If there is a showdown between their priorities and someone else’s priorities,” Clark said, “you should defer to the person who you report to.”

Also read: Bosses should do this simple thing to make their employees more creative

If your boss’s position seems ethically or logistically untenable, “stay true to yourself,” said Monster.com career expert Vicki Salemi. “If you disagree with something, or it’s unrealistic, or just doesn’t make business sense, then hopefully you can speak up and state your case, and explain your reasoning.”

Stay neutral. You might try what career coach Roy Cohen calls his “Switzerland strategy,” and remain neutral to the best of your ability. One way to do that, Cohen told Moneyish, is to “overdeliver” enough information and data to address all parties’ concerns — but avoid making the call yourself. “Instead of telling people, ‘Well, here’s what I believe’ or ‘Here’s what I recommend,’ … What you’re doing instead is you’re saying, ‘Here are the facts; here’s the data; you all make the decision.”

Involve your boss. If your supervisor and a key client want something done two different ways, Clark said, “clearly you don’t want to just ignore the key client.” But don’t try to figure it out on your own — instead, have your boss help hash it out “so that you are not the person who gets blamed in the end because someone is unsatisfied.” Clark added, “You want the discussion to be public, not private … so you are not seen as someone playing favorites or subverting a process.”

Also read: Here’s how to manage your boss like a boss

Talk it out. Migrate the dispute offline to a phone call or face-to-face conversation, Salemi suggested, as “information can get lost in translation over email,” and “nothing can replace a smile and a handshake.” Plus, she added, it might wrap up the issue more expeditiously: A five- to 10-minute meeting could resolve a never-ending email chain.

Try to find common ground. “If you can help be a force that breaks entrenched sides out of angrily locking into default positions … (and) asks questions thoughtfully, and probes for the reason that they feel a certain way and what they’re really trying to accomplish, you may be able to come up with creative solutions that don’t necessarily meet what the sides originally thought they were seeking — but (accomplish) something similar enough in principle that they are reasonably happy,” Clark said.